{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 前言"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "对于自动化办公而言，网络数据的批量获取完数据可以节约相当的时间，因此爬虫在自动化办公中占据了一个比较重要的位置。\n",
    "\n",
    "\n",
    "因而本节针对爬虫项目进行一个介绍，力求最大程度还原实际的办公场景。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Requests简介"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:22:32.718316Z",
     "start_time": "2022-05-23T03:22:32.710319Z"
    }
   },
   "source": [
    "Requests是一款目前非常流行的http请求库，使用python编写，能非常方便的对网页Requests进行爬取，也是爬虫最常用的发起请求第三方库。\n",
    "\n",
    "\n",
    "安装方法：\n",
    "\n",
    "pip install requests\n",
    "\n",
    "或者conda安装\n",
    "\n",
    "conda install requests\n",
    "\n",
    "- re.status_code 响应的HTTP状态码\n",
    "- re.text 响应内容的字符串形式\n",
    "- rs.content 响应内容的二进制形式\n",
    "- rs.encoding 响应内容的编码"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 访问百度\n",
    "\n",
    "试一试对百度首页进行数据请求：\n",
    "\n",
    "项目难度：⭐"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:23:08.402049Z",
     "start_time": "2022-05-23T03:23:08.002808Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "200\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "# 发出http请求\n",
    "re=requests.get(\"https://www.baidu.com\")\n",
    "# 查看响应状态\n",
    "print(re.status_code)\n",
    "#输出：200\n",
    "#200就是响应的状态码，表示请求成功\n",
    "#我们可以通过res.status_code的值来判断请求是否成功。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 下载txt文件\n",
    "\n",
    "例：用爬虫下载孔乙己的文章，网址是https://apiv3.shanbay.com/codetime/articles/mnvdu\n",
    "\n",
    "我们打开这个网址 可以看到是鲁迅的文章\n",
    "\n",
    "我们尝试着用爬虫保存文章的内容\n",
    "\n",
    "项目难度：⭐"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:23:41.108296Z",
     "start_time": "2022-05-23T03:23:40.906504Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "网页的状态码为200\n",
      "正在爬取小说\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "# 发出http请求\n",
    "re = requests.get('https://apiv3.shanbay.com/codetime/articles/mnvdu')\n",
    "# 查看响应状态\n",
    "print('网页的状态码为%s'%re.status_code)\n",
    "with open('鲁迅文章.txt', 'w') as file:\n",
    "  # 将数据的字符串形式写入文件中\n",
    "    print('正在爬取小说')\n",
    "    file.write(re.text)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 下载图片\n",
    "\n",
    "**re.text用于文本内容的获取、下载**\n",
    "\n",
    "**re.content用于图片、视频、音频等内容的获取、下载**\n",
    "\n",
    "项目难度：⭐⭐\n",
    "\n",
    "**re.encoding** 爬取内容的编码形似，常见的编码方式有 ASCII、GBK、UTF-8 等。如果用和文件编码不同的方式去解码，我们就会得到一些乱码。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:24:33.271092Z",
     "start_time": "2022-05-23T03:24:33.024553Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "爬取图片\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "# 发出http请求\n",
    "#下载图片\n",
    "res=requests.get('https://img-blog.csdnimg.cn/20210424184053989.PNG')\n",
    "# 以二进制写入的方式打开一个名为 info.jpg 的文件\n",
    "with open('datawhale.png','wb') as ff:\n",
    "    # 将数据的二进制形式写入文件中\n",
    "    print('爬取图片')\n",
    "    ff.write(res.content)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# HTML解析"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**浏览器工作原理：**\n",
    "\n",
    "向浏览器中输入某个网址，浏览器回向服务器发出请求，然后服务器就会作出响应。其实，服务器返回给浏览器的这个结果就是HTML代码，浏览器会根据这个HTML代码将网页解析成平时我们看到的那样\n",
    "\n",
    "比如我们来看看百度的html页面"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:27:10.739806Z",
     "start_time": "2022-05-23T03:27:10.584831Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<!DOCTYPE html>\r\n",
      "<!--STATUS OK--><html> <head><meta http-equiv=content-type content=text/html;charset=utf-8><meta http-equiv=X-UA-Compatible content=IE=Edge><meta content=always name=referrer><link rel=stylesheet type=text/css href=http://s1.bdstatic.com/r/www/cache/bdorz/baidu.min.css><title>百度一下，你就知道</title></head> <body link=#0000cc> <div id=wrapper> <div id=head> <div class=head_wrapper> <div class=s_form> <div class=s_form_wrapper> <div id=lg> <img hidefocus=true src=//www.baidu.com/img/bd_logo1.png width=270 height=129> </div> <form id=form name=f action=//www.baidu.com/s class=fm> <input type=hidden name=bdorz_come value=1> <input type=hidden name=ie value=utf-8> <input type=hidden name=f value=8> <input type=hidden name=rsv_bp value=1> <input type=hidden name=rsv_idx value=1> <input type=hidden name=tn value=baidu><span class=\"bg s_ipt_wr\"><input id=kw name=wd class=s_ipt value maxlength=255 autocomplete=off autofocus></span><span class=\"bg s_btn_wr\"><input type=submit id=su value=百度一下 class=\"bg s_btn\"></span> </form> </div> </div> <div id=u1> <a href=http://news.baidu.com name=tj_trnews class=mnav>新闻</a> <a href=http://www.hao123.com name=tj_trhao123 class=mnav>hao123</a> <a href=http://map.baidu.com name=tj_trmap class=mnav>地图</a> <a href=http://v.baidu.com name=tj_trvideo class=mnav>视频</a> <a href=http://tieba.baidu.com name=tj_trtieba class=mnav>贴吧</a> <noscript> <a href=http://www.baidu.com/bdorz/login.gif?login&amp;tpl=mn&amp;u=http%3A%2F%2Fwww.baidu.com%2f%3fbdorz_come%3d1 name=tj_login class=lb>登录</a> </noscript> <script>document.write('<a href=\"http://www.baidu.com/bdorz/login.gif?login&tpl=mn&u='+ encodeURIComponent(window.location.href+ (window.location.search === \"\" ? \"?\" : \"&\")+ \"bdorz_come=1\")+ '\" name=\"tj_login\" class=\"lb\">登录</a>');</script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style=\"display: block;\">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>&copy;2017&nbsp;Baidu&nbsp;<a href=http://www.baidu.com/duty/>使用百度前必读</a>&nbsp; <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a>&nbsp;京ICP证030173号&nbsp; <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>\r\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "res=requests.get('https://baidu.com')\n",
    "res.encoding='utf-8'\n",
    "print(res.text)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "将会看到很多带有标签的信息\n",
    "\n",
    "**HTML(Hyper Text Markup Language)**是一种超文本标记语言，是由一堆标记组成。\n",
    "\n",
    "例如\n",
    "\n",
    "```html\n",
    "<html>\n",
    "  <head>\n",
    "    <title>我的网页</title>\n",
    "  </head>\n",
    "  <body>\n",
    "    Hello，World\n",
    "  </body>\n",
    "</html>\n",
    "```\n",
    "\n",
    "上面即为一个最简单的html，我们所需要的信息就是夹在标签中\n",
    "\n",
    "想对html有根据深入的了解，可以html菜鸟教程\n",
    "\n",
    "<https://www.runoob.com/html/html-tutorial.html>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# BeautifulSoup简介\n",
    "我们一般会使用BeautifulSoup这个第三方库\n",
    "\n",
    "安装方法：\n",
    "\n",
    "``` python\n",
    "pip install bs4\n",
    "或\n",
    "conda install bs4\n",
    "```\n",
    "\n",
    "我们来解析豆瓣读书 Top250 \n",
    "\n",
    "它的网址是：<https://book.douban.com/top250>\n",
    "\n",
    "项目难度：⭐⭐"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:28:05.946613Z",
     "start_time": "2022-05-23T03:28:03.803252Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<!DOCTYPE html>\n",
      "<html class=\"ua-mac ua-webkit book-new-nav\" lang=\"zh-cmn-Hans\">\n",
      "<head>\n",
      "<meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\"/>\n",
      "<title>豆瓣读书 Top 250</title>\n",
      "<script>!function(e){var o=function(o,n,t){var c,i,r=new Date;n=n||30,t=t||\"/\",r.setTime(r.getTime()+24*n*60*60*1e3),c=\"; expires=\"+r.toGMTString();for(i in o)e.cookie=i+\"=\"+o[i]+c+\"; path=\"+t},n=function(o){var n,t,c,i=o+\"=\",r=e.cookie.split(\";\");for(t=0,c=r.length;t<c;t++)if(n=r[t].replace(/^\\s+|\\s+$/g,\"\"),0==n.indexOf(i))return n.substring(i.length,n.length).replace(/\\\"/g,\"\");return null},t=e.write,c={\"douban.com\":1,\"douban.fm\":1,\"google.com\":1,\"google.cn\":1,\"googleapis.com\":1,\"gmaptiles.co.kr\":1,\"gstatic.com\":1,\"gstatic.cn\":1,\"google-analytics.com\":1,\"googleadservices.com\":1},i=function(e,o){var n=new Image;n.onload=function(){},n.src=\"https://www.douban.com/j/except_report?kind=ra022&reason=\"+encodeURIComponent(e)+\"&environment=\"+encodeURIComponent(o)},r=function(o){try{t.call(e,o)}catch(e){t(o)}},a=/<script.*?src\\=[\"']?([^\"'\\s>]+)/gi,g=/http:\\/\\/(.+?)\\.([^\\/]+).+/i;e.writeln=e.write=function(e){var t,l=a.exec(e);return l&&(t=g.exec(l[1]))?c[t[2]]?void r(e):void(\"tqs\"!==n(\"hj\")&&(i(l[1],location.href),o({hj:\"tqs\"},1),setTimeout(function(){location.replace(location.href)},50))):void r(e)}}(document);</script>\n",
      "<meta content=\"no-cache\" http-equiv=\"Pragma\"/>\n",
      "<meta content=\"Sun, 6 Mar 2005 01:00:00 GMT\" http-equiv=\"Expires\"/>\n",
      "<script>var _head_start = new Date();</script>\n",
      "<link href=\"https://img3.doubanio.com/f/book/8011541306494bc2ff483299d952d9c65753c43d/css/book/master.css\" rel=\"stylesheet\" type=\"text/css\"/>\n",
      "<link href=\"https://img3.doubanio.com/f/book/222a5c61e041638af8defc87cf97f4a863a77922/css/book/base/init.css\" rel=\"stylesheet\"/>\n",
      "<style type=\"text/css\"></style>\n",
      "<script src=\"https://img3.doubanio.com/f/book/0495cb173e298c28593766009c7b0a953246c5b5/js/book/lib/jquery/jquery.js\"></script>\n",
      "<script src=\"https://img3.doubanio.com/f/shire/22ee83f45f94c7a90e73e0ee4acd18f902a6991f/js/douban.js\"></script>\n",
      "<script src=\"https://img3.doubanio.com/f/book/0322e3e810e475f1c82adb7d1c6ccfa1c0fa969c/js/book/master.js\"></script>\n",
      "<script> </script>\n",
      "<!-- COLLECTED CSS -->\n",
      "<link href=\"https://img3.doubanio.com/favicon.ico\" rel=\"shortcut icon\" type=\"image/x-icon\"/>\n",
      "</head>\n",
      "<body>\n",
      "<script>var _body_start = new Date();</script>\n",
      "<link href=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/shire/bundle.css\" rel=\"stylesheet\" type=\"text/css\"/>\n",
      "<div class=\"global-nav\" id=\"db-global-nav\">\n",
      "<div class=\"bd\">\n",
      "<div class=\"top-nav-info\">\n",
      "<a class=\"nav-login\" href=\"https://accounts.douban.com/passport/login?source=book\" rel=\"nofollow\">登录/注册</a>\n",
      "</div>\n",
      "<div class=\"top-nav-doubanapp\">\n",
      "<a class=\"lnk-doubanapp\" href=\"https://www.douban.com/doubanapp/app?channel=top-nav\">下载豆瓣客户端</a>\n",
      "<div id=\"doubanapp-tip\">\n",
      "<a class=\"tip-link\" href=\"https://www.douban.com/doubanapp/app?channel=qipao\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>\n",
      "<a class=\"tip-close\" href=\"javascript: void 0;\">×</a>\n",
      "</div>\n",
      "<div class=\"more-items\" id=\"top-nav-appintro\">\n",
      "<p class=\"appintro-title\">豆瓣</p>\n",
      "<p class=\"qrcode\">扫码直接下载</p>\n",
      "<div class=\"download\">\n",
      "<a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&amp;direct_dl=1&amp;download=iOS\">iPhone</a>\n",
      "<span>·</span>\n",
      "<a class=\"download-android\" href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&amp;direct_dl=1&amp;download=Android\">Android</a>\n",
      "</div>\n",
      "</div>\n",
      "</div>\n",
      "<div class=\"global-nav-items\">\n",
      "<ul>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-main\",\"uid\":\"0\"}' href=\"https://www.douban.com\" target=\"_blank\">豆瓣</a>\n",
      "</li>\n",
      "<li class=\"on\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-book\",\"uid\":\"0\"}' href=\"https://book.douban.com\">读书</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-movie\",\"uid\":\"0\"}' href=\"https://movie.douban.com\" target=\"_blank\">电影</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-music\",\"uid\":\"0\"}' href=\"https://music.douban.com\" target=\"_blank\">音乐</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-location\",\"uid\":\"0\"}' href=\"https://www.douban.com/location\" target=\"_blank\">同城</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-group\",\"uid\":\"0\"}' href=\"https://www.douban.com/group\" target=\"_blank\">小组</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-read\",\"uid\":\"0\"}' href=\"https://read.douban.com/?dcs=top-nav&amp;dcm=douban\" target=\"_blank\">阅读</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-fm\",\"uid\":\"0\"}' href=\"https://douban.fm/?from_=shire_top_nav\" target=\"_blank\">FM</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-time\",\"uid\":\"0\"}' href=\"https://time.douban.com/?dt_time_source=douban-web_top_nav\" target=\"_blank\">时间</a>\n",
      "</li>\n",
      "<li class=\"\">\n",
      "<a data-moreurl-dict='{\"from\":\"top-nav-click-market\",\"uid\":\"0\"}' href=\"https://market.douban.com/?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\">豆品</a>\n",
      "</li>\n",
      "</ul>\n",
      "</div>\n",
      "</div>\n",
      "</div>\n",
      "<script>\n",
      "  ;window._GLOBAL_NAV = {\n",
      "    DOUBAN_URL: \"https://www.douban.com\",\n",
      "    N_NEW_NOTIS: 0,\n",
      "    N_NEW_DOUMAIL: 0\n",
      "  };\n",
      "</script>\n",
      "<script defer=\"defer\" src=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/shire/bundle.js\"></script>\n",
      "<link href=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/book/bundle.css\" rel=\"stylesheet\" type=\"text/css\"/>\n",
      "<div class=\"nav\" id=\"db-nav-book\">\n",
      "<div class=\"nav-wrap\">\n",
      "<div class=\"nav-primary\">\n",
      "<div class=\"nav-logo\">\n",
      "<a href=\"https://book.douban.com\">豆瓣读书</a>\n",
      "</div>\n",
      "<div class=\"nav-search\">\n",
      "<form action=\"https://search.douban.com/book/subject_search\" method=\"get\">\n",
      "<fieldset>\n",
      "<legend>搜索：</legend>\n",
      "<label for=\"inp-query\">\n",
      "</label>\n",
      "<div class=\"inp\"><input id=\"inp-query\" maxlength=\"60\" name=\"search_text\" placeholder=\"书名、作者、ISBN\" size=\"22\" value=\"\"/></div>\n",
      "<div class=\"inp-btn\"><input type=\"submit\" value=\"搜索\"/></div>\n",
      "<input name=\"cat\" type=\"hidden\" value=\"1001\"/>\n",
      "</fieldset>\n",
      "</form>\n",
      "</div>\n",
      "</div>\n",
      "</div>\n",
      "<div class=\"nav-secondary\">\n",
      "<div class=\"nav-items\">\n",
      "<ul>\n",
      "<li><a href=\"https://book.douban.com/cart/\">购书单</a>\n",
      "</li>\n",
      "<li><a href=\"https://read.douban.com/ebooks/?dcs=book-nav&amp;dcm=douban\" target=\"_blank\">电子图书</a>\n",
      "</li>\n",
      "<li><a href=\"https://market.douban.com/book?utm_campaign=book_nav_freyr&amp;utm_source=douban&amp;utm_medium=pc_web\">豆瓣书店</a>\n",
      "</li>\n",
      "<li><a href=\"https://book.douban.com/annual/2021?source=navigation\" target=\"_blank\">2021年度榜单</a>\n",
      "</li>\n",
      "<li><a href=\"https://www.douban.com/standbyme/2021?fullscreen=true&amp;hidenav=true&amp;autorotate=false&amp;source=book_navigation\" target=\"_blank\">2021书影音报告</a>\n",
      "</li>\n",
      "<li class=\"book-cart\"><a href=\"https://market.douban.com/cart/?biz_type=book&amp;utm_campaign=book_nav_cart&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\">购物车</a>\n",
      "</li>\n",
      "</ul>\n",
      "</div>\n",
      "<a class=\"bookannual\" href=\"https://book.douban.com/annual/2021?source=book_navigation\"></a>\n",
      "</div>\n",
      "</div>\n",
      "<script id=\"suggResult\" type=\"text/x-jquery-tmpl\">\n",
      "  <li data-link=\"{{= url}}\">\n",
      "            <a href=\"{{= url}}\" onclick=\"moreurl(this, {from:'book_search_sugg', query:'{{= keyword }}', subject_id:'{{= id}}', i: '{{= index}}', type: '{{= type}}'})\">\n",
      "            <img src=\"{{= pic}}\" width=\"40\" />\n",
      "            <div>\n",
      "                <em>{{= title}}</em>\n",
      "                {{if year}}\n",
      "                    <span>{{= year}}</span>\n",
      "                {{/if}}\n",
      "                <p>\n",
      "                {{if type == \"b\"}}\n",
      "                    {{= author_name}}\n",
      "                {{else type == \"a\" }}\n",
      "                    {{if en_name}}\n",
      "                        {{= en_name}}\n",
      "                    {{/if}}\n",
      "                {{/if}}\n",
      "                 </p>\n",
      "            </div>\n",
      "        </a>\n",
      "        </li>\n",
      "  </script>\n",
      "<script defer=\"defer\" src=\"//img3.doubanio.com/dae/accounts/resources/3e96b44/book/bundle.js\"></script>\n",
      "<div id=\"wrapper\">\n",
      "<div id=\"content\">\n",
      "<h1>豆瓣读书 Top 250</h1>\n",
      "<div class=\"grid-16-8 clearfix\">\n",
      "<div class=\"article\">\n",
      "<div class=\"indent\">\n",
      "<p class=\"ulfirst\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1007305/\" onclick=\"moreurl(this,{i:'0'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s1070959.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1007305/\" onclick=\"&quot;moreurl(this,{i:'0'})&quot;\" title=\"红楼梦\">\n",
      "                红楼梦\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "</div>\n",
      "<p class=\"pl\">[清] 曹雪芹 著 / 人民文学出版社 / 1996-12 / 59.70元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar50\"></span>\n",
      "<span class=\"rating_nums\">9.6</span>\n",
      "<span class=\"pl\">(\n",
      "                    369100人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">都云作者痴，谁解其中味？</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/4913064/\" onclick=\"moreurl(this,{i:'1'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s27279654.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/4913064/\" onclick=\"&quot;moreurl(this,{i:'1'})&quot;\" title=\"活着\">\n",
      "                活着\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "</div>\n",
      "<p class=\"pl\">余华 / 作家出版社 / 2012-8-1 / 20.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.4</span>\n",
      "<span class=\"pl\">(\n",
      "                    689159人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">生的苦难与伟大</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/4820710/\" onclick=\"moreurl(this,{i:'2'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s4371408.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/4820710/\" onclick=\"&quot;moreurl(this,{i:'2'})&quot;\" title=\"1984\">\n",
      "                1984\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Nineteen Eighty-Four</span>\n",
      "</div>\n",
      "<p class=\"pl\">[英] 乔治·奥威尔 / 刘绍铭 / 北京十月文艺出版社 / 2010-4-1 / 28.00</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.4</span>\n",
      "<span class=\"pl\">(\n",
      "                    238535人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">栗树荫下，我出卖你，你出卖我</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/6082808/\" onclick=\"moreurl(this,{i:'3'})\">\n",
      "<img src=\"https://img3.doubanio.com/view/subject/s/public/s27237850.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/6082808/\" onclick=\"&quot;moreurl(this,{i:'3'})&quot;\" title=\"百年孤独\">\n",
      "                百年孤独\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Cien años de soledad</span>\n",
      "</div>\n",
      "<p class=\"pl\">[哥伦比亚] 加西亚·马尔克斯 / 范晔 / 南海出版公司 / 2011-6 / 39.50元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.3</span>\n",
      "<span class=\"pl\">(\n",
      "                    373580人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">魔幻现实主义文学代表作</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/6518605/\" onclick=\"moreurl(this,{i:'4'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s28357056.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/6518605/\" onclick=\"&quot;moreurl(this,{i:'4'})&quot;\" title=\"三体全集\">\n",
      "                三体全集\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 地球往事三部曲 </span>\n",
      "</a>\n",
      "</div>\n",
      "<p class=\"pl\">刘慈欣 / 重庆出版社 / 2012-1-1 / 168.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.4</span>\n",
      "<span class=\"pl\">(\n",
      "                    132842人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">地球往事三部曲</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1068920/\" onclick=\"moreurl(this,{i:'5'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s1078958.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1068920/\" onclick=\"&quot;moreurl(this,{i:'5'})&quot;\" title=\"飘\">\n",
      "                飘\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Gone with the Wind</span>\n",
      "</div>\n",
      "<p class=\"pl\">[美国] 玛格丽特·米切尔 / 李美华 / 译林出版社 / 2000-9 / 40.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.3</span>\n",
      "<span class=\"pl\">(\n",
      "                    192565人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">革命时期的爱情，随风而逝</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/24531956/\" onclick=\"moreurl(this,{i:'6'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s29101586.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/24531956/\" onclick=\"&quot;moreurl(this,{i:'6'})&quot;\" title=\"哈利·波特\">\n",
      "                哈利·波特\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Harry Potter</span>\n",
      "</div>\n",
      "<p class=\"pl\">J.K.罗琳 (J.K.Rowling) / 苏农 / 人民文学出版社 / 2008-12-1 / 498.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar50\"></span>\n",
      "<span class=\"rating_nums\">9.7</span>\n",
      "<span class=\"pl\">(\n",
      "                    70482人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">从9¾站台开始的旅程</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1019568/\" onclick=\"moreurl(this,{i:'7'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1076932.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1019568/\" onclick=\"&quot;moreurl(this,{i:'7'})&quot;\" title=\"三国演义（全二册）\">\n",
      "                三国演义（全二册）\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "</div>\n",
      "<p class=\"pl\">[明] 罗贯中 / 人民文学出版社 / 1998-05 / 39.50元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.3</span>\n",
      "<span class=\"pl\">(\n",
      "                    149272人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">是非成败转头空</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/27614904/\" onclick=\"moreurl(this,{i:'8'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s29651121.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/27614904/\" onclick=\"&quot;moreurl(this,{i:'8'})&quot;\" title=\"房思琪的初恋乐园\">\n",
      "                房思琪的初恋乐园\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "</div>\n",
      "<p class=\"pl\">林奕含 / 北京联合出版公司 / 2018-2 / 45.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.2</span>\n",
      "<span class=\"pl\">(\n",
      "                    308917人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">向死而生的文学绝唱</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/2035179/\" onclick=\"moreurl(this,{i:'9'})\">\n",
      "<img src=\"https://img3.doubanio.com/view/subject/s/public/s2347590.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/2035179/\" onclick=\"&quot;moreurl(this,{i:'9'})&quot;\" title=\"动物农场\">\n",
      "                动物农场\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Animal Farm</span>\n",
      "</div>\n",
      "<p class=\"pl\">[英] 乔治·奥威尔 / 荣如德 / 上海译文出版社 / 2007-3 / 10.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.3</span>\n",
      "<span class=\"pl\">(\n",
      "                    131884人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">太阳底下并无新事</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1040211/\" onclick=\"moreurl(this,{i:'10'})\">\n",
      "<img src=\"https://img3.doubanio.com/view/subject/s/public/s1229240.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1040211/\" onclick=\"&quot;moreurl(this,{i:'10'})&quot;\" title=\"福尔摩斯探案全集（上中下）\">\n",
      "                福尔摩斯探案全集（上中下）\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">[英] 阿·柯南道尔 / 丁钟华 等 / 群众出版社 / 1981-8 / 53.00元/68.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.3</span>\n",
      "<span class=\"pl\">(\n",
      "                    117633人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">名侦探的代名词</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/10554308/\" onclick=\"moreurl(this,{i:'11'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s24514468.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/10554308/\" onclick=\"&quot;moreurl(this,{i:'11'})&quot;\" title=\"白夜行\">\n",
      "                白夜行\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">[日] 东野圭吾 / 刘姿君 / 南海出版公司 / 2013-1-1 / 39.50元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.1</span>\n",
      "<span class=\"pl\">(\n",
      "                    390538人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">一宗离奇命案牵出跨度近20年步步惊心的故事</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1084336/\" onclick=\"moreurl(this,{i:'12'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1103152.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1084336/\" onclick=\"&quot;moreurl(this,{i:'12'})&quot;\" title=\"小王子\">\n",
      "                小王子\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Le Petit Prince</span>\n",
      "</div>\n",
      "<p class=\"pl\">[法] 圣埃克苏佩里 / 马振聘 / 人民文学出版社 / 2003-8 / 22.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.0</span>\n",
      "<span class=\"pl\">(\n",
      "                    687734人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">献给长成了大人的孩子们</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1046209/\" onclick=\"moreurl(this,{i:'13'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1034062.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1046209/\" onclick=\"&quot;moreurl(this,{i:'13'})&quot;\" title=\"安徒生童话故事集\">\n",
      "                安徒生童话故事集\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">（丹麦）安徒生 / 叶君健 / 人民文学出版社 / 1997-08 / 25.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.2</span>\n",
      "<span class=\"pl\">(\n",
      "                    114395人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">为了争取未来的一代</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1255625/\" onclick=\"moreurl(this,{i:'14'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s26018275.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1255625/\" onclick=\"&quot;moreurl(this,{i:'14'})&quot;\" title=\"天龙八部\">\n",
      "                天龙八部\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">金庸 / 生活·读书·新知三联书店 / 1994-5 / 96.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.1</span>\n",
      "<span class=\"pl\">(\n",
      "                    121068人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">有情皆孽，无人不冤</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1060068/\" onclick=\"moreurl(this,{i:'15'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1369343.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1060068/\" onclick=\"&quot;moreurl(this,{i:'15'})&quot;\" title=\"撒哈拉的故事\">\n",
      "                撒哈拉的故事\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">三毛 / 哈尔滨出版社 / 2003-8 / 15.80元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.2</span>\n",
      "<span class=\"pl\">(\n",
      "                    138482人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">游荡的自由灵魂</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/6781808/\" onclick=\"moreurl(this,{i:'16'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s23128183.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/6781808/\" onclick=\"&quot;moreurl(this,{i:'16'})&quot;\" title=\"杀死一只知更鸟\">\n",
      "                杀死一只知更鸟\n",
      "\n",
      "                \n",
      "              </a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">To Kill a Mocking Bird</span>\n",
      "</div>\n",
      "<p class=\"pl\">[美] 哈珀·李 / 高红梅 / 译林出版社 / 2012-9 / 32.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.2</span>\n",
      "<span class=\"pl\">(\n",
      "                    119455人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">有一种东西不能遵循从众原则，那就是——人的良心</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1449351/\" onclick=\"moreurl(this,{i:'17'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s34099286.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1449351/\" onclick=\"&quot;moreurl(this,{i:'17'})&quot;\" title=\"呐喊\">\n",
      "                呐喊\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">鲁迅 / 人民文学出版社 / 1973-3 / 0.36元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.0</span>\n",
      "<span class=\"pl\">(\n",
      "                    133545人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">新文学的第一声呐喊</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/3674537/\" onclick=\"moreurl(this,{i:'18'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s3745215.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/3674537/\" onclick=\"&quot;moreurl(this,{i:'18'})&quot;\" title=\"明朝那些事儿（1-9）\">\n",
      "                明朝那些事儿（1-9）\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 限量版 </span>\n",
      "</a>\n",
      "</div>\n",
      "<p class=\"pl\">当年明月 / 中国海关出版社 / 2009-4 / 358.20元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.1</span>\n",
      "<span class=\"pl\">(\n",
      "                    137846人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">不拘一格的历史书写</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1054685/\" onclick=\"moreurl(this,{i:'19'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s1447349.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1054685/\" onclick=\"&quot;moreurl(this,{i:'19'})&quot;\" title=\"沉默的大多数\">\n",
      "                沉默的大多数\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 王小波杂文随笔全编 </span>\n",
      "</a>\n",
      "</div>\n",
      "<p class=\"pl\">王小波 / 中国青年出版社 / 1997-10 / 27.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.1</span>\n",
      "<span class=\"pl\">(\n",
      "                    133047人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">沉默是沉默者的通行证</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/4908885/\" onclick=\"moreurl(this,{i:'20'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s4468484.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/4908885/\" onclick=\"&quot;moreurl(this,{i:'20'})&quot;\" title=\"局外人\">\n",
      "                局外人\n",
      "\n",
      "                \n",
      "              </a>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">L'Etranger</span>\n",
      "</div>\n",
      "<p class=\"pl\">[法] 阿尔贝·加缪 / 柳鸣九 / 上海译文出版社 / 2010-8 / 22.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.0</span>\n",
      "<span class=\"pl\">(\n",
      "                    195505人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">人生在世，永远也不该演戏作假</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/30172069/\" onclick=\"moreurl(this,{i:'21'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s29799269.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/30172069/\" onclick=\"&quot;moreurl(this,{i:'21'})&quot;\" title=\"失踪的孩子\">\n",
      "                失踪的孩子\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲4 </span>\n",
      "</a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Storia della bambina perduta</span>\n",
      "</div>\n",
      "<p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2018-7 / 62.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.2</span>\n",
      "<span class=\"pl\">(\n",
      "                    59862人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">我的整个生命，只是一场为了提升社会地位的低俗斗争。</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/26986954/\" onclick=\"moreurl(this,{i:'22'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s29376146.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/26986954/\" onclick=\"&quot;moreurl(this,{i:'22'})&quot;\" title=\"新名字的故事\">\n",
      "                新名字的故事\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲2 </span>\n",
      "</a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">Storia del nuovo cognome</span>\n",
      "</div>\n",
      "<p class=\"pl\">[意] 埃莱娜·费兰特 / 陈英 / 人民文学出版社 / 2017-4 / 59.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.1</span>\n",
      "<span class=\"pl\">(\n",
      "                    70581人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">探索青年时代的激情、困惑、挣扎、背叛和失去</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/1003479/\" onclick=\"moreurl(this,{i:'23'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s1319205.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/1003479/\" onclick=\"&quot;moreurl(this,{i:'23'})&quot;\" title=\"中国历代政治得失\">\n",
      "                中国历代政治得失\n",
      "\n",
      "                \n",
      "              </a>\n",
      "</div>\n",
      "<p class=\"pl\">钱穆 / 生活·读书·新知三联书店 / 2001 / 12.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.2</span>\n",
      "<span class=\"pl\">(\n",
      "                    58792人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">一部简明的“中国政治制度史”</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<p class=\"ul\"></p>\n",
      "<table width=\"100%\">\n",
      "<tr class=\"item\">\n",
      "<td valign=\"top\" width=\"100\">\n",
      "<a class=\"nbg\" href=\"https://book.douban.com/subject/25985021/\" onclick=\"moreurl(this,{i:'24'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s27814883.jpg\" width=\"90\"/>\n",
      "</a>\n",
      "</td>\n",
      "<td valign=\"top\">\n",
      "<div class=\"pl2\">\n",
      "<a href=\"https://book.douban.com/subject/25985021/\" onclick=\"&quot;moreurl(this,{i:'24'})&quot;\" title=\"人类简史\">\n",
      "                人类简史\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 从动物到上帝 </span>\n",
      "</a>\n",
      "\n",
      "\n",
      "\n",
      "                  <img alt=\"可试读\" src=\"/pics/read.gif\" title=\"可试读\"/>\n",
      "<br/>\n",
      "<span style=\"font-size:12px;\">A brief history of humankind</span>\n",
      "</div>\n",
      "<p class=\"pl\">[以色列] 尤瓦尔·赫拉利 / 林俊宏 / 中信出版社 / 2014-11 / 68.00元</p>\n",
      "<div class=\"star clearfix\">\n",
      "<span class=\"allstar45\"></span>\n",
      "<span class=\"rating_nums\">9.1</span>\n",
      "<span class=\"pl\">(\n",
      "                    173788人评价\n",
      "                )</span>\n",
      "</div>\n",
      "<p class=\"quote\" style=\"margin: 10px 0; color: #666\">\n",
      "<span class=\"inq\">跟着人类一同走过十万年</span>\n",
      "</p>\n",
      "</td>\n",
      "</tr>\n",
      "</table>\n",
      "<div class=\"paginator\">\n",
      "<span class=\"prev\">\n",
      "            &lt;前页\n",
      "        </span>\n",
      "<span class=\"thispage\">1</span>\n",
      "<a href=\"https://book.douban.com/top250?start=25\">2</a>\n",
      "<a href=\"https://book.douban.com/top250?start=50\">3</a>\n",
      "<a href=\"https://book.douban.com/top250?start=75\">4</a>\n",
      "<a href=\"https://book.douban.com/top250?start=100\">5</a>\n",
      "<a href=\"https://book.douban.com/top250?start=125\">6</a>\n",
      "<a href=\"https://book.douban.com/top250?start=150\">7</a>\n",
      "<a href=\"https://book.douban.com/top250?start=175\">8</a>\n",
      "<a href=\"https://book.douban.com/top250?start=200\">9</a>\n",
      "<a href=\"https://book.douban.com/top250?start=225\">10</a>\n",
      "<span class=\"next\">\n",
      "<link href=\"https://book.douban.com/top250?start=25\" rel=\"next\"/>\n",
      "<a href=\"https://book.douban.com/top250?start=25\">后页&gt;</a>\n",
      "</span>\n",
      "</div>\n",
      "</div>\n",
      "</div>\n",
      "<div class=\"aside\">\n",
      "<span class=\"indent pl\">\n",
      "    豆瓣用户每天都在对“读过”的书进行“很差”到“力荐”的评价，豆瓣根据每本书读过的人数以及该书所得的评价等综合数据，通过算法分析产生了豆瓣读书 Top 250。\n",
      "  </span>\n",
      "</div>\n",
      "<div class=\"extra\">\n",
      "</div>\n",
      "</div>\n",
      "</div>\n",
      "<div id=\"footer\">\n",
      "<span class=\"fleft gray-link\" id=\"icp\">\n",
      "    © 2005－2022 douban.com, all rights reserved 北京豆网科技有限公司\n",
      "</span>\n",
      "<a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>\n",
      "<span class=\"fright\">\n",
      "<a href=\"https://www.douban.com/about\">关于豆瓣</a>\n",
      "    · <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>\n",
      "    · <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>\n",
      "    · <a href=\"https://www.douban.com/about/legal\">法律声明</a>\n",
      "    \n",
      "    · <a href=\"https://help.douban.com/?app=book\" target=\"_blank\">帮助中心</a>\n",
      "    · <a href=\"https://book.douban.com/library_invitation\">图书馆合作</a>\n",
      "    · <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>\n",
      "    · <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>\n",
      "</span>\n",
      "</div>\n",
      "</div>\n",
      "<!-- COLLECTED JS -->\n",
      "<!-- mako -->\n",
      "<script type=\"text/javascript\">\n",
      "  var _paq = _paq || [];\n",
      "  _paq.push(['trackPageView']);\n",
      "  _paq.push(['enableLinkTracking']);\n",
      "  (function() {\n",
      "    var p=(('https:' == document.location.protocol) ? 'https' : 'http'), u=p+'://fundin.douban.com/';\n",
      "    _paq.push(['setTrackerUrl', u+'piwik']);\n",
      "    _paq.push(['setSiteId', '100001']);\n",
      "    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; \n",
      "    g.type='text/javascript';\n",
      "    g.defer=true; \n",
      "    g.async=true; \n",
      "    g.src=p+'://s.doubanio.com/dae/fundin/piwik.js';\n",
      "    s.parentNode.insertBefore(g,s);\n",
      "  })();\n",
      "</script>\n",
      "<script type=\"text/javascript\">\n",
      "var setMethodWithNs = function(namespace) {\n",
      "  var ns = namespace ? namespace + '.' : ''\n",
      "    , fn = function(string) {\n",
      "        if(!ns) {return string}\n",
      "        return ns + string\n",
      "      }\n",
      "  return fn\n",
      "}\n",
      "\n",
      "var gaWithNamespace = function(fn, namespace) {\n",
      "  var method = setMethodWithNs(namespace)\n",
      "  fn.call(this, method)\n",
      "}\n",
      "\n",
      "var _gaq = _gaq || []\n",
      "  , accounts = [\n",
      "      { id: 'UA-7019765-1', namespace: 'douban' }\n",
      "    , { id: 'UA-7019765-16', namespace: '' }\n",
      "    ]\n",
      "  , gaInit = function(account) {\n",
      "      gaWithNamespace(function(method) {\n",
      "        gaInitFn.call(this, method, account)\n",
      "      }, account.namespace)\n",
      "    }\n",
      "  , gaInitFn = function(method, account) {\n",
      "      _gaq.push([method('_setAccount'), account.id])\n",
      "\n",
      "      \n",
      "  _gaq.push([method('_addOrganic'), 'google', 'q'])\n",
      "  _gaq.push([method('_addOrganic'), 'baidu', 'wd'])\n",
      "  _gaq.push([method('_addOrganic'), 'soso', 'w'])\n",
      "  _gaq.push([method('_addOrganic'), 'youdao', 'q'])\n",
      "  _gaq.push([method('_addOrganic'), 'so.360.cn', 'q'])\n",
      "  _gaq.push([method('_addOrganic'), 'sogou', 'query'])\n",
      "  if (account.namespace) {\n",
      "    _gaq.push([method('_addIgnoredOrganic'), '豆瓣'])\n",
      "    _gaq.push([method('_addIgnoredOrganic'), 'douban'])\n",
      "    _gaq.push([method('_addIgnoredOrganic'), '豆瓣网'])\n",
      "    _gaq.push([method('_addIgnoredOrganic'), 'www.douban.com'])\n",
      "  }\n",
      "\n",
      "      if (account.namespace === 'douban') {\n",
      "        _gaq.push([method('_setDomainName'), '.douban.com'])\n",
      "      }\n",
      "\n",
      "        _gaq.push([method('_setCustomVar'), 1, 'responsive_view_mode', 'desktop', 3])\n",
      "\n",
      "        _gaq.push([method('_setCustomVar'), 2, 'login_status', '0', 2]);\n",
      "\n",
      "      _gaq.push([method('_trackPageview')])\n",
      "    }\n",
      "\n",
      "for(var i = 0, l = accounts.length; i < l; i++) {\n",
      "  var account = accounts[i]\n",
      "  gaInit(account)\n",
      "}\n",
      "\n",
      "\n",
      ";(function() {\n",
      "    var ga = document.createElement('script');\n",
      "    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n",
      "    ga.setAttribute('async', 'true');\n",
      "    document.documentElement.firstChild.appendChild(ga);\n",
      "})()\n",
      "</script>\n",
      "<!-- dae-web-book--default-9d5857877-chz8n-->\n",
      "</body>\n",
      "</html>\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import io\n",
    "import sys\n",
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "###运行出现乱码时可以修改编码方式\n",
    "#sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='gb18030')\n",
    "###\n",
    "headers = {\n",
    "  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'\n",
    "}\n",
    "res = requests.get('https://book.douban.com/top250', headers=headers)\n",
    "soup = BeautifulSoup(res.text, 'lxml')\n",
    "print(soup)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:28:15.151105Z",
     "start_time": "2022-05-23T03:28:15.143069Z"
    }
   },
   "source": [
    "python 打印信息时会有限制 我们将打印的编码改成gb18030\n",
    "\n",
    "headers表示我们的请求网页的头，对于没有headers的请求可能会被服务器判定为爬虫而拒绝提供服务\n",
    "\n",
    "通过 from bs4 import BeautifulSoup 语句导入 BeautifulSoup\n",
    "\n",
    "然后使用 BeautifulSoup(res.text, lxmlr’) 语句将网页源代码的字符串形式解析成了 BeautifulSoup 对象\n",
    "\n",
    "解析成了 BeautifulSoup 对象可以较为方便的提取我们需要的信息\n",
    "\n",
    "那么如何提取信息呢？\n",
    "\n",
    "BeautifulSoup 为我们提供了一些方法\n",
    "\n",
    "**find()方法**和**find_all()方法**：\n",
    "\n",
    "- **find()** 返回符合条件的**首个**数据\n",
    "- **find_all()** 返回符合条件的**所有**数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:28:25.607722Z",
     "start_time": "2022-05-23T03:28:25.283056Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<a class=\"nav-login\" href=\"https://accounts.douban.com/passport/login?source=book\" rel=\"nofollow\">登录/注册</a>\n",
      "[<a class=\"nav-login\" href=\"https://accounts.douban.com/passport/login?source=book\" rel=\"nofollow\">登录/注册</a>, <a class=\"lnk-doubanapp\" href=\"https://www.douban.com/doubanapp/app?channel=top-nav\">下载豆瓣客户端</a>, <a class=\"tip-link\" href=\"https://www.douban.com/doubanapp/app?channel=qipao\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>, <a class=\"tip-close\" href=\"javascript: void 0;\">×</a>, <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&amp;direct_dl=1&amp;download=iOS\">iPhone</a>, <a class=\"download-android\" href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&amp;direct_dl=1&amp;download=Android\">Android</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-main\",\"uid\":\"0\"}' href=\"https://www.douban.com\" target=\"_blank\">豆瓣</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-book\",\"uid\":\"0\"}' href=\"https://book.douban.com\">读书</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-movie\",\"uid\":\"0\"}' href=\"https://movie.douban.com\" target=\"_blank\">电影</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-music\",\"uid\":\"0\"}' href=\"https://music.douban.com\" target=\"_blank\">音乐</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-location\",\"uid\":\"0\"}' href=\"https://www.douban.com/location\" target=\"_blank\">同城</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-group\",\"uid\":\"0\"}' href=\"https://www.douban.com/group\" target=\"_blank\">小组</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-read\",\"uid\":\"0\"}' href=\"https://read.douban.com/?dcs=top-nav&amp;dcm=douban\" target=\"_blank\">阅读</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-fm\",\"uid\":\"0\"}' href=\"https://douban.fm/?from_=shire_top_nav\" target=\"_blank\">FM</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-time\",\"uid\":\"0\"}' href=\"https://time.douban.com/?dt_time_source=douban-web_top_nav\" target=\"_blank\">时间</a>, <a data-moreurl-dict='{\"from\":\"top-nav-click-market\",\"uid\":\"0\"}' href=\"https://market.douban.com/?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\">豆品</a>, <a href=\"https://book.douban.com\">豆瓣读书</a>, <a href=\"https://book.douban.com/cart/\">购书单</a>, <a href=\"https://read.douban.com/ebooks/?dcs=book-nav&amp;dcm=douban\" target=\"_blank\">电子图书</a>, <a href=\"https://market.douban.com/book?utm_campaign=book_nav_freyr&amp;utm_source=douban&amp;utm_medium=pc_web\">豆瓣书店</a>, <a href=\"https://book.douban.com/annual/2021?source=navigation\" target=\"_blank\">2021年度榜单</a>, <a href=\"https://www.douban.com/standbyme/2021?fullscreen=true&amp;hidenav=true&amp;autorotate=false&amp;source=book_navigation\" target=\"_blank\">2021书影音报告</a>, <a href=\"https://market.douban.com/cart/?biz_type=book&amp;utm_campaign=book_nav_cart&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\">购物车</a>, <a class=\"bookannual\" href=\"https://book.douban.com/annual/2021?source=book_navigation\"></a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1007305/\" onclick=\"moreurl(this,{i:'0'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s1070959.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1007305/\" onclick=\"&quot;moreurl(this,{i:'0'})&quot;\" title=\"红楼梦\">\n",
      "                红楼梦\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/4913064/\" onclick=\"moreurl(this,{i:'1'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s27279654.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/4913064/\" onclick=\"&quot;moreurl(this,{i:'1'})&quot;\" title=\"活着\">\n",
      "                活着\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/4820710/\" onclick=\"moreurl(this,{i:'2'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s4371408.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/4820710/\" onclick=\"&quot;moreurl(this,{i:'2'})&quot;\" title=\"1984\">\n",
      "                1984\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/6082808/\" onclick=\"moreurl(this,{i:'3'})\">\n",
      "<img src=\"https://img3.doubanio.com/view/subject/s/public/s27237850.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/6082808/\" onclick=\"&quot;moreurl(this,{i:'3'})&quot;\" title=\"百年孤独\">\n",
      "                百年孤独\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/6518605/\" onclick=\"moreurl(this,{i:'4'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s28357056.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/6518605/\" onclick=\"&quot;moreurl(this,{i:'4'})&quot;\" title=\"三体全集\">\n",
      "                三体全集\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 地球往事三部曲 </span>\n",
      "</a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1068920/\" onclick=\"moreurl(this,{i:'5'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s1078958.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1068920/\" onclick=\"&quot;moreurl(this,{i:'5'})&quot;\" title=\"飘\">\n",
      "                飘\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/24531956/\" onclick=\"moreurl(this,{i:'6'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s29101586.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/24531956/\" onclick=\"&quot;moreurl(this,{i:'6'})&quot;\" title=\"哈利·波特\">\n",
      "                哈利·波特\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1019568/\" onclick=\"moreurl(this,{i:'7'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1076932.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1019568/\" onclick=\"&quot;moreurl(this,{i:'7'})&quot;\" title=\"三国演义（全二册）\">\n",
      "                三国演义（全二册）\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/27614904/\" onclick=\"moreurl(this,{i:'8'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s29651121.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/27614904/\" onclick=\"&quot;moreurl(this,{i:'8'})&quot;\" title=\"房思琪的初恋乐园\">\n",
      "                房思琪的初恋乐园\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/2035179/\" onclick=\"moreurl(this,{i:'9'})\">\n",
      "<img src=\"https://img3.doubanio.com/view/subject/s/public/s2347590.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/2035179/\" onclick=\"&quot;moreurl(this,{i:'9'})&quot;\" title=\"动物农场\">\n",
      "                动物农场\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1040211/\" onclick=\"moreurl(this,{i:'10'})\">\n",
      "<img src=\"https://img3.doubanio.com/view/subject/s/public/s1229240.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1040211/\" onclick=\"&quot;moreurl(this,{i:'10'})&quot;\" title=\"福尔摩斯探案全集（上中下）\">\n",
      "                福尔摩斯探案全集（上中下）\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/10554308/\" onclick=\"moreurl(this,{i:'11'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s24514468.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/10554308/\" onclick=\"&quot;moreurl(this,{i:'11'})&quot;\" title=\"白夜行\">\n",
      "                白夜行\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1084336/\" onclick=\"moreurl(this,{i:'12'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1103152.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1084336/\" onclick=\"&quot;moreurl(this,{i:'12'})&quot;\" title=\"小王子\">\n",
      "                小王子\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1046209/\" onclick=\"moreurl(this,{i:'13'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1034062.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1046209/\" onclick=\"&quot;moreurl(this,{i:'13'})&quot;\" title=\"安徒生童话故事集\">\n",
      "                安徒生童话故事集\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1255625/\" onclick=\"moreurl(this,{i:'14'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s26018275.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1255625/\" onclick=\"&quot;moreurl(this,{i:'14'})&quot;\" title=\"天龙八部\">\n",
      "                天龙八部\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1060068/\" onclick=\"moreurl(this,{i:'15'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s1369343.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1060068/\" onclick=\"&quot;moreurl(this,{i:'15'})&quot;\" title=\"撒哈拉的故事\">\n",
      "                撒哈拉的故事\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/6781808/\" onclick=\"moreurl(this,{i:'16'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s23128183.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/6781808/\" onclick=\"&quot;moreurl(this,{i:'16'})&quot;\" title=\"杀死一只知更鸟\">\n",
      "                杀死一只知更鸟\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1449351/\" onclick=\"moreurl(this,{i:'17'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s34099286.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1449351/\" onclick=\"&quot;moreurl(this,{i:'17'})&quot;\" title=\"呐喊\">\n",
      "                呐喊\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/3674537/\" onclick=\"moreurl(this,{i:'18'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s3745215.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/3674537/\" onclick=\"&quot;moreurl(this,{i:'18'})&quot;\" title=\"明朝那些事儿（1-9）\">\n",
      "                明朝那些事儿（1-9）\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 限量版 </span>\n",
      "</a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1054685/\" onclick=\"moreurl(this,{i:'19'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s1447349.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1054685/\" onclick=\"&quot;moreurl(this,{i:'19'})&quot;\" title=\"沉默的大多数\">\n",
      "                沉默的大多数\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 王小波杂文随笔全编 </span>\n",
      "</a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/4908885/\" onclick=\"moreurl(this,{i:'20'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s4468484.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/4908885/\" onclick=\"&quot;moreurl(this,{i:'20'})&quot;\" title=\"局外人\">\n",
      "                局外人\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/30172069/\" onclick=\"moreurl(this,{i:'21'})\">\n",
      "<img src=\"https://img1.doubanio.com/view/subject/s/public/s29799269.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/30172069/\" onclick=\"&quot;moreurl(this,{i:'21'})&quot;\" title=\"失踪的孩子\">\n",
      "                失踪的孩子\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲4 </span>\n",
      "</a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/26986954/\" onclick=\"moreurl(this,{i:'22'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s29376146.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/26986954/\" onclick=\"&quot;moreurl(this,{i:'22'})&quot;\" title=\"新名字的故事\">\n",
      "                新名字的故事\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 那不勒斯四部曲2 </span>\n",
      "</a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/1003479/\" onclick=\"moreurl(this,{i:'23'})\">\n",
      "<img src=\"https://img9.doubanio.com/view/subject/s/public/s1319205.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/1003479/\" onclick=\"&quot;moreurl(this,{i:'23'})&quot;\" title=\"中国历代政治得失\">\n",
      "                中国历代政治得失\n",
      "\n",
      "                \n",
      "              </a>, <a class=\"nbg\" href=\"https://book.douban.com/subject/25985021/\" onclick=\"moreurl(this,{i:'24'})\">\n",
      "<img src=\"https://img2.doubanio.com/view/subject/s/public/s27814883.jpg\" width=\"90\"/>\n",
      "</a>, <a href=\"https://book.douban.com/subject/25985021/\" onclick=\"&quot;moreurl(this,{i:'24'})&quot;\" title=\"人类简史\">\n",
      "                人类简史\n",
      "\n",
      "                \n",
      "                  <span style=\"font-size:12px;\"> : 从动物到上帝 </span>\n",
      "</a>, <a href=\"https://book.douban.com/top250?start=25\">2</a>, <a href=\"https://book.douban.com/top250?start=50\">3</a>, <a href=\"https://book.douban.com/top250?start=75\">4</a>, <a href=\"https://book.douban.com/top250?start=100\">5</a>, <a href=\"https://book.douban.com/top250?start=125\">6</a>, <a href=\"https://book.douban.com/top250?start=150\">7</a>, <a href=\"https://book.douban.com/top250?start=175\">8</a>, <a href=\"https://book.douban.com/top250?start=200\">9</a>, <a href=\"https://book.douban.com/top250?start=225\">10</a>, <a href=\"https://book.douban.com/top250?start=25\">后页&gt;</a>, <a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>, <a href=\"https://www.douban.com/about\">关于豆瓣</a>, <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>, <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>, <a href=\"https://www.douban.com/about/legal\">法律声明</a>, <a href=\"https://help.douban.com/?app=book\" target=\"_blank\">帮助中心</a>, <a href=\"https://book.douban.com/library_invitation\">图书馆合作</a>, <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>, <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>]\n"
     ]
    }
   ],
   "source": [
    "import io\n",
    "import sys\n",
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "#如果出现了乱码报错，可以修改编码形式\n",
    "#sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='gb18030')\n",
    "#\n",
    "headers = {\n",
    "  'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36'\n",
    "}\n",
    "res = requests.get('https://book.douban.com/top250', headers=headers)\n",
    "soup = BeautifulSoup(res.text, 'lxml')\n",
    "print(soup.find('a'))\n",
    "#<a class=\"nav-login\" href=\"https://accounts.douban.com/passport/login?source=book\" rel=\"nofollow\">登录/注册</a>\n",
    "print(soup.find_all('a'))\n",
    "#返回一个列表 包含了所有的<a>标签"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "除了传入 HTML 标签名称外，BeautifulSoup 还支持其他的定位\n",
    "\n",
    "```python\n",
    "# 定位div开头 同时id为'doubanapp-tip的标签\n",
    "soup.find('div', id='doubanapp-tip')\n",
    "# 定位a抬头 同时class为rating_nums的标签\n",
    "soup.find_all('span', class_='rating_nums')\n",
    "#class是python中定义类的关键字，因此用class_表示HTML中的class\n",
    "```\n",
    "\n",
    "HTML定位方法：https://www.cnblogs.com/bosslv/p/8992410.html\n",
    "\n",
    "理论看百遍，不如上手一练"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 自如公寓数据抓取\n",
    "\n",
    "自如公寓的价格在本节不讨论，在以后的课程中，我们会详细讲解相关的方法。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "日前 , 国务院办公厅印发《关于加快培育和发展住房租赁市场的若干意见》，你是某新媒体公司的一名员工，老板希望对武汉的租房情况进行深度调研与分析，你想调查自如公寓的数据情况。根据工作的安排，你调研的是自如公寓武汉房屋出租分析的任务。\n",
    "\n",
    "项目难度：⭐⭐⭐⭐\n",
    "\n",
    "自如公寓官网：https://wh.ziroom.com/z/z/\n",
    "\n",
    "通过观察官网你发现\n",
    "\n",
    "第1页的网页为：https://wh.ziroom.com/z/p1/\n",
    "\n",
    "第2页的网页为：https://wh.ziroom.com/z/p2/\n",
    "\n",
    "第3页的网页为：https://wh.ziroom.com/z/p3/\n",
    "\n",
    "...\n",
    "\n",
    "第50页的网页为：https://wh.ziroom.com/z/p50/\n",
    "\n",
    "你继续观察，发现\n",
    "\n",
    "房屋的信息网页为类似于：https://wh.ziroom.com/x/741955798.html\n",
    "\n",
    "即：https://wh.ziroom.com/x/XXXX.html\n",
    "\n",
    "因此你有了思路，通过访问自如公寓的网站，获取每个房间后面的数字号 然后通过数字号访问房屋的直接信息，然后抓取房屋的信息保存在excel中\n",
    "\n",
    "于是你访问了房屋的网页：<https://wh.ziroom.com/x/741955798.html>\n",
    "\n",
    "通过观察房屋的网页，你发现是这些信息是你需要的\n",
    "\n",
    "房屋的名称，房屋的面积，房屋的朝向，房屋的户型，房屋的位置，房屋的楼层，是否有电梯，房屋的年代，门锁情况，绿化情况\n",
    "\n",
    "但是你遇到了困难，不知道这些信息的标签信息，不能用beautifulsoup对他们进行定位\n",
    "\n",
    "通过百度查询，浏览器按F12时能进入源代码模式 或者 点击右键进入审查元素从而进行相关的定位"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:30:56.796173Z",
     "start_time": "2022-05-23T03:30:56.778171Z"
    }
   },
   "outputs": [],
   "source": [
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "import random\n",
    "import time\n",
    "import csv"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "写到这里的时候，你想到，我多次访问自如的官网，如果只用一个UA头岂不是很容易被反爬虫识别\n",
    "\n",
    "你想到，我可以做很多个UA头，然后每次访问的时候可以随机选一个，想到这里，你直呼自己是个天才\n",
    "\n",
    "于是，你到网上找到了很多UA头信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:31:13.297902Z",
     "start_time": "2022-05-23T03:31:13.288902Z"
    }
   },
   "outputs": [],
   "source": [
    "#这里增加了很多user_agent\n",
    "#能一定程度能保护爬虫\n",
    "user_agent = [\n",
    "    \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50\",\n",
    "    \"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50\",\n",
    "    \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0\",\n",
    "    \"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3; rv:11.0) like Gecko\",\n",
    "    \"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\",\n",
    "    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\",\n",
    "    \"Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\",\n",
    "    \"Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11\",\n",
    "    \"Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11\",\n",
    "    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)\"]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "现在开始正式开始爬取数据了\n",
    "\n",
    "房屋的名称，房屋的价格，房屋的面积，房屋的朝向，房屋的户型，房屋的位置，房屋的楼层，是否有电梯，房屋的年代，门锁情况，绿化情况\n",
    "\n",
    "你思考爬取的信息应该保存到csv文件中，于是你导入了csv包 并简单的了解了CSV包的用法\n",
    "\n",
    "第一步，是要获取房屋的数字标签\n",
    "\n",
    "于是你打开了自如的官网，用浏览器的元素进行定位\n",
    "\n",
    "发现房屋的信息标签都是这个\n",
    "\n",
    "< a href=\"dd//wh.ziroom.com/x/741955798.html\" target=\"_blank\"> 房屋名称< /a >\n",
    "\n",
    "聪明的你，随手写下了这个代码,便能爬取自如前50页"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T03:31:37.085591Z",
     "start_time": "2022-05-23T03:31:37.078565Z"
    }
   },
   "outputs": [],
   "source": [
    "def get_info():\n",
    "    csvheader=['名称','面积','朝向','户型','位置','楼层','是否有电梯','建成时间',' 门锁','绿化']\n",
    "    with open('wuhan_ziru.csv', 'a+', newline='') as csvfile:\n",
    "        writer  = csv.writer(csvfile)\n",
    "        writer.writerow(csvheader)\n",
    "        for i in range(1,50):  #总共有50页\n",
    "            print('正在爬取自如第%s页'%i)\n",
    "            timelist=[1,2,3]\n",
    "            print('有点累了，需要休息一下啦（￢㉨￢）')\n",
    "            time.sleep(random.choice(timelist))   #休息1-3秒，防止给对方服务器过大的压力！！！\n",
    "            url='https://wh.ziroom.com/z/p%s/'%i\n",
    "            headers = {'User-Agent': random.choice(user_agent)}\n",
    "            r = requests.get(url, headers=headers)\n",
    "            r.encoding = r.apparent_encoding\n",
    "            soup = BeautifulSoup(r.text, 'lxml')\n",
    "            all_info = soup.find_all('div', class_='info-box')\n",
    "            print('开始干活咯(๑>؂<๑）')\n",
    "            for info in all_info:\n",
    "                href = info.find('a')\n",
    "                if href !=None:\n",
    "                    href='https:'+href['href']\n",
    "                    try:\n",
    "                        print('正在爬取%s'%href)\n",
    "                        house_info=get_house_info(href)\n",
    "                        writer.writerow(house_info)\n",
    "                    except:\n",
    "                        print('出错啦，%s进不去啦( •̥́ ˍ •̀ू )'%href)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "通过研究发现了你需要定位的信息 通过标签头 h1 li span 和class的值对标签进行定位\n",
    "\n",
    "```\n",
    "<h1 class=\"Z_name\"><i class=\"status iconicon_sign\"></i>自如友家·电建地产盛世江城·4居室-05卧</h1>\n",
    "----\n",
    "<div class=\"Z_home_info\">\n",
    "<div class=\"Z_home_b clearfix\">\n",
    "\t<dl class=\"\">\n",
    "        <dd>8.4㎡</dd>\n",
    "        <dt>使用面积</dt>\n",
    "    </dl>\n",
    "    <dl class=\"\">\n",
    "        <dd>朝南</dd>\n",
    "        <dt>朝向</dt>\n",
    "    </dl>\n",
    "\t<dl class=\"\">\n",
    "        <dd>4室1厅</dd>\n",
    "        <dt>户型</dt>\n",
    "    </dl>\n",
    "</div>\n",
    "</div>\n",
    "----\n",
    "<ul class=\"Z_home_o\">\n",
    "    <li>\n",
    "        <span class=\"la\">位置</span><span class=\"va\">\n",
    "        <span class=\"ad\">小区距2号线长港路站步行约231米</span>\n",
    "     </li>\n",
    "        <span class=\"la\">楼层</span><span class=\"va\">6/43</span>\n",
    "    </li>\n",
    "    <li>\n",
    "        <span class=\"la\">电梯</span><span class=\"va\">有</span>\n",
    "    </li>\n",
    "    <li>\n",
    "        <span class=\"la\">年代</span><span class=\"va\">2016年建成</span>\n",
    "    </li>\n",
    "    <li>\n",
    "        <span class=\"la\">门锁</span><span class=\"va\">智能门锁</span>\n",
    "    </li>\n",
    "    <li>\n",
    "        <span class=\"la\">绿化</span><span class=\"va\">35%</span>\n",
    "    </li>          \n",
    "</ul>\n",
    "```\n",
    "\n",
    "通过对上面标签的研究你完成了所有的代码"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T04:28:16.680714Z",
     "start_time": "2022-05-23T03:32:36.103970Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取自如第1页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/751514663.html\n",
      "正在爬取https://wh.ziroom.com/x/808370215.html\n",
      "正在爬取https://wh.ziroom.com/x/808317099.html\n",
      "正在爬取https://wh.ziroom.com/x/808030778.html\n",
      "正在爬取https://wh.ziroom.com/x/745881873.html\n",
      "正在爬取https://wh.ziroom.com/x/807735154.html\n",
      "正在爬取https://wh.ziroom.com/x/786641758.html\n",
      "正在爬取https://wh.ziroom.com/x/745355842.html\n",
      "正在爬取https://wh.ziroom.com/x/807858018.html\n",
      "正在爬取https://wh.ziroom.com/x/807928907.html\n",
      "正在爬取https://wh.ziroom.com/x/779120087.html\n",
      "正在爬取https://wh.ziroom.com/x/807268002.html\n",
      "正在爬取https://wh.ziroom.com/x/768041620.html\n",
      "正在爬取https://wh.ziroom.com/x/808994328.html\n",
      "正在爬取https://wh.ziroom.com/x/807988393.html\n",
      "正在爬取https://wh.ziroom.com/x/784055835.html\n",
      "正在爬取https://wh.ziroom.com/x/807132433.html\n",
      "正在爬取https://wh.ziroom.com/x/807039403.html\n",
      "正在爬取https://wh.ziroom.com/x/808997086.html\n",
      "正在爬取https://wh.ziroom.com/x/739492289.html\n",
      "正在爬取https://wh.ziroom.com/x/807845663.html\n",
      "正在爬取https://wh.ziroom.com/x/762247713.html\n",
      "正在爬取https://wh.ziroom.com/x/808956920.html\n",
      "正在爬取https://wh.ziroom.com/x/807860111.html\n",
      "正在爬取https://wh.ziroom.com/x/750800258.html\n",
      "正在爬取https://wh.ziroom.com/x/808390711.html\n",
      "正在爬取https://wh.ziroom.com/x/807398944.html\n",
      "正在爬取https://wh.ziroom.com/x/807784819.html\n",
      "正在爬取https://wh.ziroom.com/x/808958719.html\n",
      "正在爬取自如第2页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/809056572.html\n",
      "正在爬取https://wh.ziroom.com/x/809029181.html\n",
      "正在爬取https://wh.ziroom.com/x/809043776.html\n",
      "正在爬取https://wh.ziroom.com/x/808163456.html\n",
      "正在爬取https://wh.ziroom.com/x/808026137.html\n",
      "正在爬取https://wh.ziroom.com/x/809011947.html\n",
      "正在爬取https://wh.ziroom.com/x/809063859.html\n",
      "正在爬取https://wh.ziroom.com/x/808092189.html\n",
      "正在爬取https://wh.ziroom.com/x/773787124.html\n",
      "正在爬取https://wh.ziroom.com/x/757005251.html\n",
      "正在爬取https://wh.ziroom.com/x/809059267.html\n",
      "正在爬取https://wh.ziroom.com/x/807741244.html\n",
      "正在爬取https://wh.ziroom.com/x/781273196.html\n",
      "正在爬取https://wh.ziroom.com/x/807145138.html\n",
      "正在爬取https://wh.ziroom.com/x/807109914.html\n",
      "正在爬取https://wh.ziroom.com/x/764440398.html\n",
      "正在爬取https://wh.ziroom.com/x/809028131.html\n",
      "正在爬取https://wh.ziroom.com/x/807823774.html\n",
      "正在爬取https://wh.ziroom.com/x/808115856.html\n",
      "正在爬取https://wh.ziroom.com/x/780265075.html\n",
      "正在爬取https://wh.ziroom.com/x/807126161.html\n",
      "正在爬取https://wh.ziroom.com/x/761464729.html\n",
      "正在爬取https://wh.ziroom.com/x/791240043.html\n",
      "正在爬取https://wh.ziroom.com/x/796724908.html\n",
      "正在爬取https://wh.ziroom.com/x/808025703.html\n",
      "正在爬取https://wh.ziroom.com/x/807857815.html\n",
      "正在爬取https://wh.ziroom.com/x/807938833.html\n",
      "正在爬取https://wh.ziroom.com/x/807259406.html\n",
      "正在爬取https://wh.ziroom.com/x/808080877.html\n",
      "正在爬取自如第3页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/809047654.html\n",
      "正在爬取https://wh.ziroom.com/x/809031764.html\n",
      "正在爬取https://wh.ziroom.com/x/808040851.html\n",
      "正在爬取https://wh.ziroom.com/x/807982345.html\n",
      "正在爬取https://wh.ziroom.com/x/793685219.html\n",
      "正在爬取https://wh.ziroom.com/x/741554994.html\n",
      "正在爬取https://wh.ziroom.com/x/808310029.html\n",
      "正在爬取https://wh.ziroom.com/x/808040193.html\n",
      "正在爬取https://wh.ziroom.com/x/741579923.html\n",
      "正在爬取https://wh.ziroom.com/x/740839425.html\n",
      "正在爬取https://wh.ziroom.com/x/807966140.html\n",
      "正在爬取https://wh.ziroom.com/x/809044665.html\n",
      "正在爬取https://wh.ziroom.com/x/807760249.html\n",
      "正在爬取https://wh.ziroom.com/x/807858214.html\n",
      "正在爬取https://wh.ziroom.com/x/741447227.html\n",
      "正在爬取https://wh.ziroom.com/x/807859390.html\n",
      "正在爬取https://wh.ziroom.com/x/808174943.html\n",
      "正在爬取https://wh.ziroom.com/x/796614716.html\n",
      "正在爬取https://wh.ziroom.com/x/808325849.html\n",
      "正在爬取https://wh.ziroom.com/x/808235626.html\n",
      "正在爬取https://wh.ziroom.com/x/793884942.html\n",
      "正在爬取https://wh.ziroom.com/x/807079254.html\n",
      "正在爬取https://wh.ziroom.com/x/747211452.html\n",
      "正在爬取https://wh.ziroom.com/x/807832636.html\n",
      "正在爬取https://wh.ziroom.com/x/796453405.html\n",
      "正在爬取https://wh.ziroom.com/x/807796495.html\n",
      "正在爬取https://wh.ziroom.com/x/788945799.html\n",
      "正在爬取https://wh.ziroom.com/x/776135882.html\n",
      "正在爬取https://wh.ziroom.com/x/808093316.html\n",
      "正在爬取自如第4页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/793884942.html\n",
      "正在爬取https://wh.ziroom.com/x/807079254.html\n",
      "正在爬取https://wh.ziroom.com/x/808197938.html\n",
      "正在爬取https://wh.ziroom.com/x/807832636.html\n",
      "正在爬取https://wh.ziroom.com/x/796453405.html\n",
      "正在爬取https://wh.ziroom.com/x/807796495.html\n",
      "正在爬取https://wh.ziroom.com/x/788945799.html\n",
      "正在爬取https://wh.ziroom.com/x/776135882.html\n",
      "正在爬取https://wh.ziroom.com/x/793139691.html\n",
      "正在爬取https://wh.ziroom.com/x/807056525.html\n",
      "正在爬取https://wh.ziroom.com/x/807147147.html\n",
      "正在爬取https://wh.ziroom.com/x/769124722.html\n",
      "正在爬取https://wh.ziroom.com/x/807782327.html\n",
      "正在爬取https://wh.ziroom.com/x/807851669.html\n",
      "正在爬取https://wh.ziroom.com/x/807296611.html\n",
      "正在爬取https://wh.ziroom.com/x/808402814.html\n",
      "正在爬取https://wh.ziroom.com/x/784019460.html\n",
      "正在爬取https://wh.ziroom.com/x/793873011.html\n",
      "正在爬取https://wh.ziroom.com/x/774570981.html\n",
      "正在爬取https://wh.ziroom.com/x/807335440.html\n",
      "正在爬取https://wh.ziroom.com/x/742632082.html\n",
      "正在爬取https://wh.ziroom.com/x/807763280.html\n",
      "正在爬取https://wh.ziroom.com/x/791601174.html\n",
      "正在爬取https://wh.ziroom.com/x/809026885.html\n",
      "正在爬取https://wh.ziroom.com/x/808364328.html\n",
      "正在爬取https://wh.ziroom.com/x/809026234.html\n",
      "正在爬取https://wh.ziroom.com/x/807745640.html\n",
      "正在爬取https://wh.ziroom.com/x/808343055.html\n",
      "正在爬取https://wh.ziroom.com/x/807015596.html\n",
      "正在爬取https://wh.ziroom.com/x/807848043.html\n",
      "正在爬取自如第5页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/738051160.html\n",
      "正在爬取https://wh.ziroom.com/x/792339829.html\n",
      "正在爬取https://wh.ziroom.com/x/795533554.html\n",
      "正在爬取https://wh.ziroom.com/x/764286168.html\n",
      "正在爬取https://wh.ziroom.com/x/807193123.html\n",
      "正在爬取https://wh.ziroom.com/x/788748210.html\n",
      "正在爬取https://wh.ziroom.com/x/808244096.html\n",
      "正在爬取https://wh.ziroom.com/x/808122695.html\n",
      "正在爬取https://wh.ziroom.com/x/807145117.html\n",
      "正在爬取https://wh.ziroom.com/x/808271739.html\n",
      "正在爬取https://wh.ziroom.com/x/808902117.html\n",
      "正在爬取https://wh.ziroom.com/x/807923391.html\n",
      "正在爬取https://wh.ziroom.com/x/779806071.html\n",
      "正在爬取https://wh.ziroom.com/x/766292516.html\n",
      "正在爬取https://wh.ziroom.com/x/807988708.html\n",
      "正在爬取https://wh.ziroom.com/x/808273440.html\n",
      "正在爬取https://wh.ziroom.com/x/807968821.html\n",
      "正在爬取https://wh.ziroom.com/x/760303251.html\n",
      "正在爬取https://wh.ziroom.com/x/743766012.html\n",
      "正在爬取https://wh.ziroom.com/x/808266741.html\n",
      "正在爬取https://wh.ziroom.com/x/791787414.html\n",
      "正在爬取https://wh.ziroom.com/x/775316135.html\n",
      "正在爬取https://wh.ziroom.com/x/808231489.html\n",
      "正在爬取https://wh.ziroom.com/x/809057888.html\n",
      "正在爬取https://wh.ziroom.com/x/796498801.html\n",
      "正在爬取https://wh.ziroom.com/x/771766129.html\n",
      "正在爬取https://wh.ziroom.com/x/807903154.html\n",
      "正在爬取https://wh.ziroom.com/x/808995126.html\n",
      "正在爬取https://wh.ziroom.com/x/807827295.html\n",
      "正在爬取https://wh.ziroom.com/x/748805259.html\n",
      "正在爬取自如第6页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807721490.html\n",
      "正在爬取https://wh.ziroom.com/x/808023309.html\n",
      "正在爬取https://wh.ziroom.com/x/807342251.html\n",
      "正在爬取https://wh.ziroom.com/x/807789838.html\n",
      "正在爬取https://wh.ziroom.com/x/808061207.html\n",
      "正在爬取https://wh.ziroom.com/x/759600874.html\n",
      "正在爬取https://wh.ziroom.com/x/786190029.html\n",
      "正在爬取https://wh.ziroom.com/x/770299004.html\n",
      "正在爬取https://wh.ziroom.com/x/750753795.html\n",
      "正在爬取https://wh.ziroom.com/x/808968176.html\n",
      "正在爬取https://wh.ziroom.com/x/809015202.html\n",
      "正在爬取https://wh.ziroom.com/x/808147139.html\n",
      "正在爬取https://wh.ziroom.com/x/807776475.html\n",
      "正在爬取https://wh.ziroom.com/x/808920331.html\n",
      "正在爬取https://wh.ziroom.com/x/808023134.html\n",
      "正在爬取https://wh.ziroom.com/x/807795683.html\n",
      "正在爬取https://wh.ziroom.com/x/760392685.html\n",
      "正在爬取https://wh.ziroom.com/x/776378091.html\n",
      "正在爬取https://wh.ziroom.com/x/753472220.html\n",
      "正在爬取https://wh.ziroom.com/x/808041390.html\n",
      "正在爬取https://wh.ziroom.com/x/807868735.html\n",
      "正在爬取https://wh.ziroom.com/x/808202488.html\n",
      "正在爬取https://wh.ziroom.com/x/781138657.html\n",
      "正在爬取https://wh.ziroom.com/x/808186934.html\n",
      "正在爬取https://wh.ziroom.com/x/808955268.html\n",
      "正在爬取https://wh.ziroom.com/x/809043755.html\n",
      "正在爬取https://wh.ziroom.com/x/774836373.html\n",
      "正在爬取https://wh.ziroom.com/x/809063838.html\n",
      "正在爬取https://wh.ziroom.com/x/796830056.html\n",
      "正在爬取https://wh.ziroom.com/x/781138269.html\n",
      "正在爬取自如第7页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/782079848.html\n",
      "正在爬取https://wh.ziroom.com/x/808313403.html\n",
      "正在爬取https://wh.ziroom.com/x/768712278.html\n",
      "正在爬取https://wh.ziroom.com/x/808365224.html\n",
      "正在爬取https://wh.ziroom.com/x/808386420.html\n",
      "正在爬取https://wh.ziroom.com/x/750233487.html\n",
      "正在爬取https://wh.ziroom.com/x/741651412.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取https://wh.ziroom.com/x/780198436.html\n",
      "正在爬取https://wh.ziroom.com/x/792395992.html\n",
      "正在爬取https://wh.ziroom.com/x/808966342.html\n",
      "正在爬取https://wh.ziroom.com/x/808053640.html\n",
      "正在爬取https://wh.ziroom.com/x/809056698.html\n",
      "正在爬取https://wh.ziroom.com/x/744034702.html\n",
      "正在爬取https://wh.ziroom.com/x/807223965.html\n",
      "正在爬取https://wh.ziroom.com/x/747933035.html\n",
      "正在爬取https://wh.ziroom.com/x/807800597.html\n",
      "正在爬取https://wh.ziroom.com/x/808210384.html\n",
      "正在爬取https://wh.ziroom.com/x/757141245.html\n",
      "正在爬取https://wh.ziroom.com/x/808037694.html\n",
      "正在爬取https://wh.ziroom.com/x/809016399.html\n",
      "正在爬取https://wh.ziroom.com/x/807866054.html\n",
      "正在爬取https://wh.ziroom.com/x/808998500.html\n",
      "正在爬取https://wh.ziroom.com/x/807726488.html\n",
      "正在爬取https://wh.ziroom.com/x/808047067.html\n",
      "正在爬取https://wh.ziroom.com/x/796129522.html\n",
      "正在爬取https://wh.ziroom.com/x/807777812.html\n",
      "正在爬取https://wh.ziroom.com/x/809026584.html\n",
      "正在爬取https://wh.ziroom.com/x/808004822.html\n",
      "正在爬取https://wh.ziroom.com/x/778936757.html\n",
      "正在爬取https://wh.ziroom.com/x/795640060.html\n",
      "正在爬取自如第8页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/808920646.html\n",
      "正在爬取https://wh.ziroom.com/x/808046815.html\n",
      "正在爬取https://wh.ziroom.com/x/809029160.html\n",
      "正在爬取https://wh.ziroom.com/x/809031743.html\n",
      "正在爬取https://wh.ziroom.com/x/807777945.html\n",
      "正在爬取https://wh.ziroom.com/x/808021944.html\n",
      "正在爬取https://wh.ziroom.com/x/780135968.html\n",
      "正在爬取https://wh.ziroom.com/x/807813470.html\n",
      "正在爬取https://wh.ziroom.com/x/808395380.html\n",
      "正在爬取https://wh.ziroom.com/x/808378923.html\n",
      "正在爬取https://wh.ziroom.com/x/807793954.html\n",
      "正在爬取https://wh.ziroom.com/x/741162823.html\n",
      "正在爬取https://wh.ziroom.com/x/808986075.html\n",
      "正在爬取https://wh.ziroom.com/x/808985907.html\n",
      "正在爬取https://wh.ziroom.com/x/809029195.html\n",
      "正在爬取https://wh.ziroom.com/x/808937894.html\n",
      "正在爬取https://wh.ziroom.com/x/808363852.html\n",
      "正在爬取https://wh.ziroom.com/x/750260744.html\n",
      "正在爬取https://wh.ziroom.com/x/795635986.html\n",
      "正在爬取https://wh.ziroom.com/x/807079296.html\n",
      "正在爬取https://wh.ziroom.com/x/807632254.html\n",
      "正在爬取https://wh.ziroom.com/x/808915536.html\n",
      "正在爬取https://wh.ziroom.com/x/808941548.html\n",
      "正在爬取https://wh.ziroom.com/x/794439103.html\n",
      "正在爬取https://wh.ziroom.com/x/808053766.html\n",
      "正在爬取https://wh.ziroom.com/x/743764557.html\n",
      "正在爬取https://wh.ziroom.com/x/763381255.html\n",
      "正在爬取https://wh.ziroom.com/x/807147133.html\n",
      "正在爬取https://wh.ziroom.com/x/807272265.html\n",
      "正在爬取https://wh.ziroom.com/x/795587583.html\n",
      "正在爬取自如第9页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/792281726.html\n",
      "正在爬取https://wh.ziroom.com/x/794425135.html\n",
      "正在爬取https://wh.ziroom.com/x/807977816.html\n",
      "正在爬取https://wh.ziroom.com/x/807705376.html\n",
      "正在爬取https://wh.ziroom.com/x/763772359.html\n",
      "正在爬取https://wh.ziroom.com/x/808947512.html\n",
      "正在爬取https://wh.ziroom.com/x/790576854.html\n",
      "正在爬取https://wh.ziroom.com/x/807040894.html\n",
      "正在爬取https://wh.ziroom.com/x/760209549.html\n",
      "正在爬取https://wh.ziroom.com/x/780073597.html\n",
      "正在爬取https://wh.ziroom.com/x/807193116.html\n",
      "正在爬取https://wh.ziroom.com/x/779519145.html\n",
      "正在爬取https://wh.ziroom.com/x/807917147.html\n",
      "正在爬取https://wh.ziroom.com/x/808973069.html\n",
      "正在爬取https://wh.ziroom.com/x/776611182.html\n",
      "正在爬取https://wh.ziroom.com/x/762407375.html\n",
      "正在爬取https://wh.ziroom.com/x/808980517.html\n",
      "正在爬取https://wh.ziroom.com/x/758169930.html\n",
      "正在爬取https://wh.ziroom.com/x/808398908.html\n",
      "正在爬取https://wh.ziroom.com/x/808388856.html\n",
      "正在爬取https://wh.ziroom.com/x/807276773.html\n",
      "正在爬取https://wh.ziroom.com/x/745779053.html\n",
      "正在爬取https://wh.ziroom.com/x/794311839.html\n",
      "正在爬取https://wh.ziroom.com/x/769739314.html\n",
      "正在爬取https://wh.ziroom.com/x/808943620.html\n",
      "正在爬取https://wh.ziroom.com/x/767102369.html\n",
      "正在爬取https://wh.ziroom.com/x/751938650.html\n",
      "正在爬取https://wh.ziroom.com/x/807301511.html\n",
      "正在爬取https://wh.ziroom.com/x/741868401.html\n",
      "正在爬取https://wh.ziroom.com/x/808345099.html\n",
      "正在爬取自如第10页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/790261895.html\n",
      "正在爬取https://wh.ziroom.com/x/807412181.html\n",
      "正在爬取https://wh.ziroom.com/x/807957929.html\n",
      "正在爬取https://wh.ziroom.com/x/745323638.html\n",
      "正在爬取https://wh.ziroom.com/x/771925112.html\n",
      "正在爬取https://wh.ziroom.com/x/747209124.html\n",
      "正在爬取https://wh.ziroom.com/x/808051519.html\n",
      "正在爬取https://wh.ziroom.com/x/808984598.html\n",
      "正在爬取https://wh.ziroom.com/x/808231909.html\n",
      "正在爬取https://wh.ziroom.com/x/743330094.html\n",
      "正在爬取https://wh.ziroom.com/x/783748151.html\n",
      "正在爬取https://wh.ziroom.com/x/765812075.html\n",
      "正在爬取https://wh.ziroom.com/x/807905744.html\n",
      "正在爬取https://wh.ziroom.com/x/808054158.html\n",
      "正在爬取https://wh.ziroom.com/x/785924055.html\n",
      "正在爬取https://wh.ziroom.com/x/777312686.html\n",
      "正在爬取https://wh.ziroom.com/x/807988680.html\n",
      "正在爬取https://wh.ziroom.com/x/807057435.html\n",
      "正在爬取https://wh.ziroom.com/x/735920943.html\n",
      "正在爬取https://wh.ziroom.com/x/754279551.html\n",
      "正在爬取https://wh.ziroom.com/x/796557001.html\n",
      "正在爬取https://wh.ziroom.com/x/809015447.html\n",
      "正在爬取https://wh.ziroom.com/x/789636245.html\n",
      "正在爬取https://wh.ziroom.com/x/789635372.html\n",
      "正在爬取https://wh.ziroom.com/x/807874335.html\n",
      "正在爬取https://wh.ziroom.com/x/767957133.html\n",
      "正在爬取https://wh.ziroom.com/x/747345603.html\n",
      "正在爬取https://wh.ziroom.com/x/766777128.html\n",
      "正在爬取https://wh.ziroom.com/x/808929837.html\n",
      "正在爬取https://wh.ziroom.com/x/739976901.html\n",
      "正在爬取自如第11页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/789142321.html\n",
      "正在爬取https://wh.ziroom.com/x/808097292.html\n",
      "正在爬取https://wh.ziroom.com/x/808972418.html\n",
      "正在爬取https://wh.ziroom.com/x/807207354.html\n",
      "正在爬取https://wh.ziroom.com/x/763361176.html\n",
      "正在爬取https://wh.ziroom.com/x/807974743.html\n",
      "正在爬取https://wh.ziroom.com/x/767786316.html\n",
      "正在爬取https://wh.ziroom.com/x/749939771.html\n",
      "正在爬取https://wh.ziroom.com/x/751330460.html\n",
      "正在爬取https://wh.ziroom.com/x/741368754.html\n",
      "正在爬取https://wh.ziroom.com/x/744564807.html\n",
      "正在爬取https://wh.ziroom.com/x/739812777.html\n",
      "正在爬取https://wh.ziroom.com/x/808975918.html\n",
      "正在爬取https://wh.ziroom.com/x/760275121.html\n",
      "正在爬取https://wh.ziroom.com/x/807029386.html\n",
      "正在爬取https://wh.ziroom.com/x/744646481.html\n",
      "正在爬取https://wh.ziroom.com/x/759632593.html\n",
      "正在爬取https://wh.ziroom.com/x/790187690.html\n",
      "正在爬取https://wh.ziroom.com/x/755218899.html\n",
      "正在爬取https://wh.ziroom.com/x/809029020.html\n",
      "正在爬取https://wh.ziroom.com/x/735350874.html\n",
      "正在爬取https://wh.ziroom.com/x/808943606.html\n",
      "正在爬取https://wh.ziroom.com/x/740513796.html\n",
      "正在爬取https://wh.ziroom.com/x/749992442.html\n",
      "正在爬取https://wh.ziroom.com/x/808180088.html\n",
      "正在爬取https://wh.ziroom.com/x/747955927.html\n",
      "正在爬取https://wh.ziroom.com/x/743594710.html\n",
      "正在爬取https://wh.ziroom.com/x/758134428.html\n",
      "正在爬取https://wh.ziroom.com/x/809020515.html\n",
      "正在爬取https://wh.ziroom.com/x/748883247.html\n",
      "正在爬取自如第12页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/764651858.html\n",
      "正在爬取https://wh.ziroom.com/x/808405432.html\n",
      "正在爬取https://wh.ziroom.com/x/743152293.html\n",
      "正在爬取https://wh.ziroom.com/x/785623549.html\n",
      "正在爬取https://wh.ziroom.com/x/745358655.html\n",
      "正在爬取https://wh.ziroom.com/x/784194545.html\n",
      "正在爬取https://wh.ziroom.com/x/744272934.html\n",
      "正在爬取https://wh.ziroom.com/x/808988476.html\n",
      "正在爬取https://wh.ziroom.com/x/780883353.html\n",
      "正在爬取https://wh.ziroom.com/x/807818629.html\n",
      "正在爬取https://wh.ziroom.com/x/808157058.html\n",
      "正在爬取https://wh.ziroom.com/x/808158815.html\n",
      "正在爬取https://wh.ziroom.com/x/808958880.html\n",
      "正在爬取https://wh.ziroom.com/x/808949598.html\n",
      "正在爬取https://wh.ziroom.com/x/781320532.html\n",
      "正在爬取https://wh.ziroom.com/x/807963921.html\n",
      "正在爬取https://wh.ziroom.com/x/796787085.html\n",
      "正在爬取https://wh.ziroom.com/x/807196777.html\n",
      "正在爬取https://wh.ziroom.com/x/807811881.html\n",
      "正在爬取https://wh.ziroom.com/x/807845306.html\n",
      "正在爬取https://wh.ziroom.com/x/808174677.html\n",
      "正在爬取https://wh.ziroom.com/x/770657128.html\n",
      "正在爬取https://wh.ziroom.com/x/741273597.html\n",
      "正在爬取https://wh.ziroom.com/x/768051902.html\n",
      "正在爬取https://wh.ziroom.com/x/750004761.html\n",
      "正在爬取https://wh.ziroom.com/x/809013963.html\n",
      "正在爬取https://wh.ziroom.com/x/807967218.html\n",
      "正在爬取https://wh.ziroom.com/x/808905491.html\n",
      "正在爬取https://wh.ziroom.com/x/808931958.html\n",
      "正在爬取https://wh.ziroom.com/x/808394988.html\n",
      "正在爬取自如第13页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807745612.html\n",
      "正在爬取https://wh.ziroom.com/x/807032515.html\n",
      "正在爬取https://wh.ziroom.com/x/808258761.html\n",
      "正在爬取https://wh.ziroom.com/x/807760123.html\n",
      "正在爬取https://wh.ziroom.com/x/784380203.html\n",
      "正在爬取https://wh.ziroom.com/x/760520434.html\n",
      "正在爬取https://wh.ziroom.com/x/809028138.html\n",
      "正在爬取https://wh.ziroom.com/x/782265409.html\n",
      "正在爬取https://wh.ziroom.com/x/808058190.html\n",
      "正在爬取https://wh.ziroom.com/x/753148240.html\n",
      "正在爬取https://wh.ziroom.com/x/809022139.html\n",
      "正在爬取https://wh.ziroom.com/x/808986551.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取https://wh.ziroom.com/x/808999718.html\n",
      "正在爬取https://wh.ziroom.com/x/792177451.html\n",
      "正在爬取https://wh.ziroom.com/x/809041368.html\n",
      "正在爬取https://wh.ziroom.com/x/808403605.html\n",
      "正在爬取https://wh.ziroom.com/x/807809970.html\n",
      "正在爬取https://wh.ziroom.com/x/807134932.html\n",
      "正在爬取https://wh.ziroom.com/x/773559465.html\n",
      "正在爬取https://wh.ziroom.com/x/745778568.html\n",
      "正在爬取https://wh.ziroom.com/x/809044637.html\n",
      "正在爬取https://wh.ziroom.com/x/776359952.html\n",
      "正在爬取https://wh.ziroom.com/x/807844823.html\n",
      "正在爬取https://wh.ziroom.com/x/756502694.html\n",
      "正在爬取https://wh.ziroom.com/x/807808227.html\n",
      "正在爬取https://wh.ziroom.com/x/808155175.html\n",
      "正在爬取https://wh.ziroom.com/x/809025541.html\n",
      "正在爬取https://wh.ziroom.com/x/781597467.html\n",
      "正在爬取https://wh.ziroom.com/x/774783508.html\n",
      "正在爬取https://wh.ziroom.com/x/807962710.html\n",
      "正在爬取自如第14页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807974694.html\n",
      "正在爬取https://wh.ziroom.com/x/764838195.html\n",
      "正在爬取https://wh.ziroom.com/x/762819043.html\n",
      "正在爬取https://wh.ziroom.com/x/808984577.html\n",
      "正在爬取https://wh.ziroom.com/x/808947484.html\n",
      "正在爬取https://wh.ziroom.com/x/807413644.html\n",
      "正在爬取https://wh.ziroom.com/x/809016287.html\n",
      "正在爬取https://wh.ziroom.com/x/809046450.html\n",
      "正在爬取https://wh.ziroom.com/x/807912702.html\n",
      "正在爬取https://wh.ziroom.com/x/783118330.html\n",
      "正在爬取https://wh.ziroom.com/x/770747144.html\n",
      "正在爬取https://wh.ziroom.com/x/760776126.html\n",
      "正在爬取https://wh.ziroom.com/x/809066841.html\n",
      "正在爬取https://wh.ziroom.com/x/739474829.html\n",
      "正在爬取https://wh.ziroom.com/x/781630253.html\n",
      "正在爬取https://wh.ziroom.com/x/791716410.html\n",
      "正在爬取https://wh.ziroom.com/x/790943029.html\n",
      "正在爬取https://wh.ziroom.com/x/807065723.html\n",
      "正在爬取https://wh.ziroom.com/x/807311409.html\n",
      "正在爬取https://wh.ziroom.com/x/808038163.html\n",
      "正在爬取https://wh.ziroom.com/x/809004142.html\n",
      "正在爬取https://wh.ziroom.com/x/795468952.html\n",
      "正在爬取https://wh.ziroom.com/x/807930825.html\n",
      "正在爬取https://wh.ziroom.com/x/783976004.html\n",
      "正在爬取https://wh.ziroom.com/x/809004163.html\n",
      "正在爬取https://wh.ziroom.com/x/808057910.html\n",
      "正在爬取https://wh.ziroom.com/x/743746030.html\n",
      "正在爬取https://wh.ziroom.com/x/776874925.html\n",
      "正在爬取https://wh.ziroom.com/x/809031582.html\n",
      "正在爬取https://wh.ziroom.com/x/807840966.html\n",
      "正在爬取自如第15页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/787403596.html\n",
      "正在爬取https://wh.ziroom.com/x/808982379.html\n",
      "正在爬取https://wh.ziroom.com/x/809026605.html\n",
      "正在爬取https://wh.ziroom.com/x/809064608.html\n",
      "正在爬取https://wh.ziroom.com/x/808964879.html\n",
      "正在爬取https://wh.ziroom.com/x/745728322.html\n",
      "正在爬取https://wh.ziroom.com/x/739793280.html\n",
      "正在爬取https://wh.ziroom.com/x/745364960.html\n",
      "正在爬取https://wh.ziroom.com/x/749605994.html\n",
      "正在爬取https://wh.ziroom.com/x/807806813.html\n",
      "正在爬取https://wh.ziroom.com/x/807747096.html\n",
      "正在爬取https://wh.ziroom.com/x/808264634.html\n",
      "正在爬取https://wh.ziroom.com/x/807167643.html\n",
      "正在爬取https://wh.ziroom.com/x/785847619.html\n",
      "正在爬取https://wh.ziroom.com/x/795576525.html\n",
      "正在爬取https://wh.ziroom.com/x/807962486.html\n",
      "正在爬取https://wh.ziroom.com/x/793021351.html\n",
      "正在爬取https://wh.ziroom.com/x/738049705.html\n",
      "正在爬取https://wh.ziroom.com/x/759158263.html\n",
      "正在爬取https://wh.ziroom.com/x/807931119.html\n",
      "正在爬取https://wh.ziroom.com/x/808248625.html\n",
      "正在爬取https://wh.ziroom.com/x/808368101.html\n",
      "正在爬取https://wh.ziroom.com/x/807064897.html\n",
      "正在爬取https://wh.ziroom.com/x/774555558.html\n",
      "正在爬取https://wh.ziroom.com/x/808387932.html\n",
      "正在爬取https://wh.ziroom.com/x/809009588.html\n",
      "正在爬取https://wh.ziroom.com/x/765357339.html\n",
      "正在爬取https://wh.ziroom.com/x/807789278.html\n",
      "正在爬取https://wh.ziroom.com/x/760277546.html\n",
      "正在爬取https://wh.ziroom.com/x/743534570.html\n",
      "正在爬取自如第16页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/417199656.html\n",
      "正在爬取https://wh.ziroom.com/x/745233913.html\n",
      "正在爬取https://wh.ziroom.com/x/807917168.html\n",
      "正在爬取https://wh.ziroom.com/x/808386245.html\n",
      "正在爬取https://wh.ziroom.com/x/808199191.html\n",
      "正在爬取https://wh.ziroom.com/x/809044756.html\n",
      "正在爬取https://wh.ziroom.com/x/808031709.html\n",
      "正在爬取https://wh.ziroom.com/x/745849572.html\n",
      "正在爬取https://wh.ziroom.com/x/765958254.html\n",
      "正在爬取https://wh.ziroom.com/x/754506143.html\n",
      "正在爬取https://wh.ziroom.com/x/778821812.html\n",
      "正在爬取https://wh.ziroom.com/x/742659436.html\n",
      "正在爬取https://wh.ziroom.com/x/761844290.html\n",
      "正在爬取https://wh.ziroom.com/x/784225682.html\n",
      "正在爬取https://wh.ziroom.com/x/765213876.html\n",
      "正在爬取https://wh.ziroom.com/x/807982520.html\n",
      "正在爬取https://wh.ziroom.com/x/745181436.html\n",
      "正在爬取https://wh.ziroom.com/x/738216836.html\n",
      "正在爬取https://wh.ziroom.com/x/807176435.html\n",
      "正在爬取https://wh.ziroom.com/x/793152786.html\n",
      "正在爬取https://wh.ziroom.com/x/807094066.html\n",
      "正在爬取https://wh.ziroom.com/x/747942250.html\n",
      "正在爬取https://wh.ziroom.com/x/807745360.html\n",
      "正在爬取https://wh.ziroom.com/x/783481498.html\n",
      "正在爬取https://wh.ziroom.com/x/737231801.html\n",
      "正在爬取https://wh.ziroom.com/x/807735147.html\n",
      "正在爬取https://wh.ziroom.com/x/796913961.html\n",
      "正在爬取https://wh.ziroom.com/x/792027489.html\n",
      "正在爬取https://wh.ziroom.com/x/770429760.html\n",
      "正在爬取https://wh.ziroom.com/x/807267316.html\n",
      "正在爬取自如第17页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807108696.html\n",
      "正在爬取https://wh.ziroom.com/x/790576563.html\n",
      "正在爬取https://wh.ziroom.com/x/808171548.html\n",
      "正在爬取https://wh.ziroom.com/x/808399972.html\n",
      "正在爬取https://wh.ziroom.com/x/808402240.html\n",
      "正在爬取https://wh.ziroom.com/x/808403332.html\n",
      "正在爬取https://wh.ziroom.com/x/808399993.html\n",
      "正在爬取https://wh.ziroom.com/x/782080042.html\n",
      "正在爬取https://wh.ziroom.com/x/771460676.html\n",
      "正在爬取https://wh.ziroom.com/x/744126755.html\n",
      "正在爬取https://wh.ziroom.com/x/794004349.html\n",
      "正在爬取https://wh.ziroom.com/x/807084903.html\n",
      "正在爬取https://wh.ziroom.com/x/749941323.html\n",
      "正在爬取https://wh.ziroom.com/x/809007733.html\n",
      "正在爬取https://wh.ziroom.com/x/807184849.html\n",
      "正在爬取https://wh.ziroom.com/x/767010704.html\n",
      "正在爬取https://wh.ziroom.com/x/739735759.html\n",
      "正在爬取https://wh.ziroom.com/x/807547624.html\n",
      "正在爬取https://wh.ziroom.com/x/752051461.html\n",
      "正在爬取https://wh.ziroom.com/x/807330960.html\n",
      "正在爬取https://wh.ziroom.com/x/747784334.html\n",
      "正在爬取https://wh.ziroom.com/x/793492189.html\n",
      "正在爬取https://wh.ziroom.com/x/807927507.html\n",
      "正在爬取https://wh.ziroom.com/x/807377755.html\n",
      "正在爬取https://wh.ziroom.com/x/787225310.html\n",
      "正在爬取https://wh.ziroom.com/x/775436124.html\n",
      "正在爬取https://wh.ziroom.com/x/808088199.html\n",
      "正在爬取https://wh.ziroom.com/x/809063026.html\n",
      "正在爬取https://wh.ziroom.com/x/808236053.html\n",
      "正在爬取https://wh.ziroom.com/x/748181840.html\n",
      "正在爬取自如第18页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/793651657.html\n",
      "正在爬取https://wh.ziroom.com/x/762654240.html\n",
      "正在爬取https://wh.ziroom.com/x/776692565.html\n",
      "正在爬取https://wh.ziroom.com/x/779587336.html\n",
      "正在爬取https://wh.ziroom.com/x/807134925.html\n",
      "正在爬取https://wh.ziroom.com/x/808306809.html\n",
      "正在爬取https://wh.ziroom.com/x/808231216.html\n",
      "正在爬取https://wh.ziroom.com/x/808040235.html\n",
      "正在爬取https://wh.ziroom.com/x/742360482.html\n",
      "正在爬取https://wh.ziroom.com/x/776904898.html\n",
      "正在爬取https://wh.ziroom.com/x/808403353.html\n",
      "正在爬取https://wh.ziroom.com/x/809013459.html\n",
      "正在爬取https://wh.ziroom.com/x/809010393.html\n",
      "正在爬取https://wh.ziroom.com/x/783071188.html\n",
      "正在爬取https://wh.ziroom.com/x/757350862.html\n",
      "正在爬取https://wh.ziroom.com/x/743433011.html\n",
      "正在爬取https://wh.ziroom.com/x/808946133.html\n",
      "正在爬取https://wh.ziroom.com/x/785903782.html\n",
      "正在爬取https://wh.ziroom.com/x/790904908.html\n",
      "正在爬取https://wh.ziroom.com/x/807926625.html\n",
      "正在爬取https://wh.ziroom.com/x/780440742.html\n",
      "正在爬取https://wh.ziroom.com/x/809029258.html\n",
      "正在爬取https://wh.ziroom.com/x/809003946.html\n",
      "正在爬取https://wh.ziroom.com/x/744277784.html\n",
      "正在爬取https://wh.ziroom.com/x/807005887.html\n",
      "正在爬取https://wh.ziroom.com/x/808046780.html\n",
      "正在爬取https://wh.ziroom.com/x/807267771.html\n",
      "正在爬取https://wh.ziroom.com/x/807801297.html\n",
      "正在爬取https://wh.ziroom.com/x/779586948.html\n",
      "正在爬取https://wh.ziroom.com/x/786147155.html\n",
      "正在爬取自如第19页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/781227800.html\n",
      "正在爬取https://wh.ziroom.com/x/809013949.html\n",
      "正在爬取https://wh.ziroom.com/x/809044735.html\n",
      "正在爬取https://wh.ziroom.com/x/807236383.html\n",
      "正在爬取https://wh.ziroom.com/x/808357685.html\n",
      "正在爬取https://wh.ziroom.com/x/776565786.html\n",
      "正在爬取https://wh.ziroom.com/x/808150310.html\n",
      "正在爬取https://wh.ziroom.com/x/750068878.html\n",
      "正在爬取https://wh.ziroom.com/x/748548985.html\n",
      "正在爬取https://wh.ziroom.com/x/808185212.html\n",
      "正在爬取https://wh.ziroom.com/x/781069593.html\n",
      "正在爬取https://wh.ziroom.com/x/789944899.html\n",
      "正在爬取https://wh.ziroom.com/x/807800212.html\n",
      "正在爬取https://wh.ziroom.com/x/780462567.html\n",
      "正在爬取https://wh.ziroom.com/x/807329819.html\n",
      "正在爬取https://wh.ziroom.com/x/768704906.html\n",
      "正在爬取https://wh.ziroom.com/x/781035061.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取https://wh.ziroom.com/x/808199898.html\n",
      "正在爬取https://wh.ziroom.com/x/763522778.html\n",
      "正在爬取https://wh.ziroom.com/x/809041592.html\n",
      "正在爬取https://wh.ziroom.com/x/795818831.html\n",
      "正在爬取https://wh.ziroom.com/x/796475133.html\n",
      "正在爬取https://wh.ziroom.com/x/793771452.html\n",
      "正在爬取https://wh.ziroom.com/x/808119335.html\n",
      "正在爬取https://wh.ziroom.com/x/785623840.html\n",
      "正在爬取https://wh.ziroom.com/x/739387432.html\n",
      "正在爬取https://wh.ziroom.com/x/807138887.html\n",
      "正在爬取https://wh.ziroom.com/x/807854728.html\n",
      "正在爬取https://wh.ziroom.com/x/807136920.html\n",
      "正在爬取https://wh.ziroom.com/x/748949692.html\n",
      "正在爬取自如第20页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807013293.html\n",
      "正在爬取https://wh.ziroom.com/x/740777345.html\n",
      "正在爬取https://wh.ziroom.com/x/808028993.html\n",
      "正在爬取https://wh.ziroom.com/x/809024722.html\n",
      "正在爬取https://wh.ziroom.com/x/778189663.html\n",
      "正在爬取https://wh.ziroom.com/x/762830780.html\n",
      "正在爬取https://wh.ziroom.com/x/771757593.html\n",
      "正在爬取https://wh.ziroom.com/x/762245967.html\n",
      "正在爬取https://wh.ziroom.com/x/757626245.html\n",
      "正在爬取https://wh.ziroom.com/x/764252703.html\n",
      "正在爬取https://wh.ziroom.com/x/808025682.html\n",
      "正在爬取https://wh.ziroom.com/x/748242562.html\n",
      "正在爬取https://wh.ziroom.com/x/808048194.html\n",
      "正在爬取https://wh.ziroom.com/x/809017302.html\n",
      "正在爬取https://wh.ziroom.com/x/767335654.html\n",
      "正在爬取https://wh.ziroom.com/x/808947246.html\n",
      "正在爬取https://wh.ziroom.com/x/807319886.html\n",
      "正在爬取https://wh.ziroom.com/x/808017639.html\n",
      "正在爬取https://wh.ziroom.com/x/808147188.html\n",
      "正在爬取https://wh.ziroom.com/x/773945913.html\n",
      "正在爬取https://wh.ziroom.com/x/756732099.html\n",
      "正在爬取https://wh.ziroom.com/x/793753410.html\n",
      "正在爬取https://wh.ziroom.com/x/781338671.html\n",
      "正在爬取https://wh.ziroom.com/x/784069124.html\n",
      "正在爬取https://wh.ziroom.com/x/755610100.html\n",
      "正在爬取https://wh.ziroom.com/x/808169140.html\n",
      "正在爬取https://wh.ziroom.com/x/792420727.html\n",
      "正在爬取https://wh.ziroom.com/x/777660625.html\n",
      "正在爬取https://wh.ziroom.com/x/807786310.html\n",
      "正在爬取https://wh.ziroom.com/x/807072653.html\n",
      "正在爬取自如第21页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/754629333.html\n",
      "正在爬取https://wh.ziroom.com/x/738183177.html\n",
      "正在爬取https://wh.ziroom.com/x/742743632.html\n",
      "正在爬取https://wh.ziroom.com/x/807219086.html\n",
      "正在爬取https://wh.ziroom.com/x/791823013.html\n",
      "正在爬取https://wh.ziroom.com/x/808246868.html\n",
      "正在爬取https://wh.ziroom.com/x/781063967.html\n",
      "正在爬取https://wh.ziroom.com/x/808065708.html\n",
      "正在爬取https://wh.ziroom.com/x/750396835.html\n",
      "正在爬取https://wh.ziroom.com/x/807776454.html\n",
      "正在爬取https://wh.ziroom.com/x/768644184.html\n",
      "正在爬取https://wh.ziroom.com/x/741961521.html\n",
      "正在爬取https://wh.ziroom.com/x/807320138.html\n",
      "正在爬取https://wh.ziroom.com/x/791514262.html\n",
      "正在爬取https://wh.ziroom.com/x/808985592.html\n",
      "正在爬取https://wh.ziroom.com/x/808033354.html\n",
      "正在爬取https://wh.ziroom.com/x/807104160.html\n",
      "正在爬取https://wh.ziroom.com/x/807850612.html\n",
      "正在爬取https://wh.ziroom.com/x/808255149.html\n",
      "正在爬取https://wh.ziroom.com/x/809064580.html\n",
      "正在爬取https://wh.ziroom.com/x/808955275.html\n",
      "正在爬取https://wh.ziroom.com/x/789722478.html\n",
      "正在爬取https://wh.ziroom.com/x/794542602.html\n",
      "正在爬取https://wh.ziroom.com/x/808231363.html\n",
      "正在爬取https://wh.ziroom.com/x/808394967.html\n",
      "正在爬取https://wh.ziroom.com/x/807253722.html\n",
      "正在爬取https://wh.ziroom.com/x/808989757.html\n",
      "正在爬取https://wh.ziroom.com/x/807084035.html\n",
      "正在爬取https://wh.ziroom.com/x/745521518.html\n",
      "正在爬取https://wh.ziroom.com/x/787659191.html\n",
      "正在爬取自如第22页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/766934365.html\n",
      "正在爬取https://wh.ziroom.com/x/807724899.html\n",
      "正在爬取https://wh.ziroom.com/x/770302496.html\n",
      "正在爬取https://wh.ziroom.com/x/808401162.html\n",
      "正在爬取https://wh.ziroom.com/x/769739605.html\n",
      "正在爬取https://wh.ziroom.com/x/808905778.html\n",
      "正在爬取https://wh.ziroom.com/x/808175517.html\n",
      "正在爬取https://wh.ziroom.com/x/768999883.html\n",
      "正在爬取https://wh.ziroom.com/x/808950977.html\n",
      "正在爬取https://wh.ziroom.com/x/807753613.html\n",
      "正在爬取https://wh.ziroom.com/x/793726832.html\n",
      "正在爬取https://wh.ziroom.com/x/787103963.html\n",
      "正在爬取https://wh.ziroom.com/x/807834043.html\n",
      "正在爬取https://wh.ziroom.com/x/744129277.html\n",
      "正在爬取https://wh.ziroom.com/x/807774291.html\n",
      "正在爬取https://wh.ziroom.com/x/808038744.html\n",
      "正在爬取https://wh.ziroom.com/x/808030183.html\n",
      "正在爬取https://wh.ziroom.com/x/807176421.html\n",
      "正在爬取https://wh.ziroom.com/x/770858112.html\n",
      "正在爬取https://wh.ziroom.com/x/787300291.html\n",
      "正在爬取https://wh.ziroom.com/x/775836346.html\n",
      "正在爬取https://wh.ziroom.com/x/807752465.html\n",
      "正在爬取https://wh.ziroom.com/x/808354395.html\n",
      "正在爬取https://wh.ziroom.com/x/809033402.html\n",
      "出错啦，https://wh.ziroom.com/x/809033402.html进不去啦( •̥́ ˍ •̀ू )\n",
      "正在爬取https://wh.ziroom.com/x/807845649.html\n",
      "正在爬取https://wh.ziroom.com/x/807980560.html\n",
      "正在爬取https://wh.ziroom.com/x/808389955.html\n",
      "正在爬取https://wh.ziroom.com/x/808955289.html\n",
      "正在爬取https://wh.ziroom.com/x/779281301.html\n",
      "正在爬取https://wh.ziroom.com/x/796375902.html\n",
      "正在爬取自如第23页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/775106421.html\n",
      "正在爬取https://wh.ziroom.com/x/779766495.html\n",
      "正在爬取https://wh.ziroom.com/x/744893734.html\n",
      "正在爬取https://wh.ziroom.com/x/739283254.html\n",
      "正在爬取https://wh.ziroom.com/x/807769559.html\n",
      "正在爬取https://wh.ziroom.com/x/760365331.html\n",
      "正在爬取https://wh.ziroom.com/x/757038716.html\n",
      "正在爬取https://wh.ziroom.com/x/793024067.html\n",
      "正在爬取https://wh.ziroom.com/x/807997584.html\n",
      "正在爬取https://wh.ziroom.com/x/747875417.html\n",
      "正在爬取https://wh.ziroom.com/x/768518278.html\n",
      "正在爬取https://wh.ziroom.com/x/807848029.html\n",
      "正在爬取https://wh.ziroom.com/x/807134099.html\n",
      "正在爬取https://wh.ziroom.com/x/788562746.html\n",
      "正在爬取https://wh.ziroom.com/x/792446820.html\n",
      "正在爬取https://wh.ziroom.com/x/809033969.html\n",
      "正在爬取https://wh.ziroom.com/x/791360808.html\n",
      "正在爬取https://wh.ziroom.com/x/775483363.html\n",
      "正在爬取https://wh.ziroom.com/x/745987991.html\n",
      "正在爬取https://wh.ziroom.com/x/775808216.html\n",
      "正在爬取https://wh.ziroom.com/x/807090034.html\n",
      "正在爬取https://wh.ziroom.com/x/766290285.html\n",
      "正在爬取https://wh.ziroom.com/x/808061557.html\n",
      "正在爬取https://wh.ziroom.com/x/809010372.html\n",
      "正在爬取https://wh.ziroom.com/x/809023980.html\n",
      "正在爬取https://wh.ziroom.com/x/809013438.html\n",
      "正在爬取https://wh.ziroom.com/x/745758489.html\n",
      "正在爬取https://wh.ziroom.com/x/808395240.html\n",
      "正在爬取https://wh.ziroom.com/x/788655769.html\n",
      "正在爬取https://wh.ziroom.com/x/760052021.html\n",
      "正在爬取自如第24页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/756833173.html\n",
      "正在爬取https://wh.ziroom.com/x/780581683.html\n",
      "正在爬取https://wh.ziroom.com/x/776637566.html\n",
      "正在爬取https://wh.ziroom.com/x/808019529.html\n",
      "正在爬取https://wh.ziroom.com/x/807898156.html\n",
      "正在爬取https://wh.ziroom.com/x/808397550.html\n",
      "正在爬取https://wh.ziroom.com/x/808904959.html\n",
      "正在爬取https://wh.ziroom.com/x/737847654.html\n",
      "正在爬取https://wh.ziroom.com/x/769009389.html\n",
      "正在爬取https://wh.ziroom.com/x/808402261.html\n",
      "正在爬取https://wh.ziroom.com/x/808106077.html\n",
      "正在爬取https://wh.ziroom.com/x/794739997.html\n",
      "正在爬取https://wh.ziroom.com/x/757246199.html\n",
      "正在爬取https://wh.ziroom.com/x/744363920.html\n",
      "正在爬取https://wh.ziroom.com/x/808920618.html\n",
      "正在爬取https://wh.ziroom.com/x/808937866.html\n",
      "正在爬取https://wh.ziroom.com/x/808921360.html\n",
      "正在爬取https://wh.ziroom.com/x/793724989.html\n",
      "正在爬取https://wh.ziroom.com/x/786678036.html\n",
      "正在爬取https://wh.ziroom.com/x/809021180.html\n",
      "正在爬取https://wh.ziroom.com/x/808108051.html\n",
      "正在爬取https://wh.ziroom.com/x/807468762.html\n",
      "正在爬取https://wh.ziroom.com/x/745326160.html\n",
      "正在爬取https://wh.ziroom.com/x/765995502.html\n",
      "正在爬取https://wh.ziroom.com/x/807083328.html\n",
      "正在爬取https://wh.ziroom.com/x/808031730.html\n",
      "正在爬取https://wh.ziroom.com/x/807931182.html\n",
      "正在爬取https://wh.ziroom.com/x/785369991.html\n",
      "正在爬取https://wh.ziroom.com/x/789472024.html\n",
      "正在爬取https://wh.ziroom.com/x/789755458.html\n",
      "正在爬取自如第25页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/769817787.html\n",
      "正在爬取https://wh.ziroom.com/x/807176302.html\n",
      "正在爬取https://wh.ziroom.com/x/808171219.html\n",
      "正在爬取https://wh.ziroom.com/x/808053780.html\n",
      "正在爬取https://wh.ziroom.com/x/807796845.html\n",
      "正在爬取https://wh.ziroom.com/x/807326319.html\n",
      "正在爬取https://wh.ziroom.com/x/744676454.html\n",
      "正在爬取https://wh.ziroom.com/x/742056096.html\n",
      "正在爬取https://wh.ziroom.com/x/807495740.html\n",
      "正在爬取https://wh.ziroom.com/x/809055578.html\n",
      "正在爬取https://wh.ziroom.com/x/809041571.html\n",
      "正在爬取https://wh.ziroom.com/x/790609058.html\n",
      "正在爬取https://wh.ziroom.com/x/790738359.html\n",
      "正在爬取https://wh.ziroom.com/x/790700044.html\n",
      "正在爬取https://wh.ziroom.com/x/779993766.html\n",
      "正在爬取https://wh.ziroom.com/x/807860713.html\n",
      "正在爬取https://wh.ziroom.com/x/781941720.html\n",
      "正在爬取https://wh.ziroom.com/x/791350817.html\n",
      "正在爬取https://wh.ziroom.com/x/781018862.html\n",
      "正在爬取https://wh.ziroom.com/x/808277913.html\n",
      "正在爬取https://wh.ziroom.com/x/791617955.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取https://wh.ziroom.com/x/809003925.html\n",
      "正在爬取https://wh.ziroom.com/x/808164513.html\n",
      "正在爬取https://wh.ziroom.com/x/747929446.html\n",
      "正在爬取https://wh.ziroom.com/x/770637049.html\n",
      "正在爬取https://wh.ziroom.com/x/796228074.html\n",
      "正在爬取https://wh.ziroom.com/x/807375228.html\n",
      "正在爬取https://wh.ziroom.com/x/789449714.html\n",
      "正在爬取https://wh.ziroom.com/x/795201038.html\n",
      "正在爬取https://wh.ziroom.com/x/739774365.html\n",
      "正在爬取自如第26页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/743831681.html\n",
      "正在爬取https://wh.ziroom.com/x/793781734.html\n",
      "正在爬取https://wh.ziroom.com/x/757625081.html\n",
      "正在爬取https://wh.ziroom.com/x/767455643.html\n",
      "正在爬取https://wh.ziroom.com/x/791489430.html\n",
      "正在爬取https://wh.ziroom.com/x/761693746.html\n",
      "正在爬取https://wh.ziroom.com/x/807260477.html\n",
      "正在爬取https://wh.ziroom.com/x/787700901.html\n",
      "正在爬取https://wh.ziroom.com/x/758101836.html\n",
      "正在爬取https://wh.ziroom.com/x/807188132.html\n",
      "正在爬取https://wh.ziroom.com/x/809056551.html\n",
      "正在爬取https://wh.ziroom.com/x/746919094.html\n",
      "正在爬取https://wh.ziroom.com/x/808314362.html\n",
      "正在爬取https://wh.ziroom.com/x/808289225.html\n",
      "正在爬取https://wh.ziroom.com/x/766052538.html\n",
      "正在爬取https://wh.ziroom.com/x/792718323.html\n",
      "正在爬取https://wh.ziroom.com/x/809006018.html\n",
      "出错啦，https://wh.ziroom.com/x/809006018.html进不去啦( •̥́ ˍ •̀ू )\n",
      "正在爬取https://wh.ziroom.com/x/808231902.html\n",
      "正在爬取https://wh.ziroom.com/x/754505755.html\n",
      "正在爬取https://wh.ziroom.com/x/795257686.html\n",
      "正在爬取https://wh.ziroom.com/x/807186347.html\n",
      "正在爬取https://wh.ziroom.com/x/786438446.html\n",
      "正在爬取https://wh.ziroom.com/x/808949619.html\n",
      "正在爬取https://wh.ziroom.com/x/779232122.html\n",
      "正在爬取https://wh.ziroom.com/x/807207326.html\n",
      "正在爬取https://wh.ziroom.com/x/807023261.html\n",
      "正在爬取https://wh.ziroom.com/x/808161664.html\n",
      "正在爬取https://wh.ziroom.com/x/763377957.html\n",
      "正在爬取https://wh.ziroom.com/x/807854777.html\n",
      "正在爬取https://wh.ziroom.com/x/808905512.html\n",
      "正在爬取自如第27页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/808905512.html\n",
      "正在爬取https://wh.ziroom.com/x/776211348.html\n",
      "正在爬取https://wh.ziroom.com/x/809067884.html\n",
      "正在爬取https://wh.ziroom.com/x/807910105.html\n",
      "正在爬取https://wh.ziroom.com/x/809025520.html\n",
      "正在爬取https://wh.ziroom.com/x/808026648.html\n",
      "正在爬取https://wh.ziroom.com/x/742658369.html\n",
      "正在爬取https://wh.ziroom.com/x/807101136.html\n",
      "正在爬取https://wh.ziroom.com/x/809048690.html\n",
      "正在爬取https://wh.ziroom.com/x/793975928.html\n",
      "正在爬取https://wh.ziroom.com/x/778822394.html\n",
      "正在爬取https://wh.ziroom.com/x/808199926.html\n",
      "正在爬取https://wh.ziroom.com/x/794628350.html\n",
      "正在爬取https://wh.ziroom.com/x/792406080.html\n",
      "正在爬取https://wh.ziroom.com/x/746603456.html\n",
      "正在爬取https://wh.ziroom.com/x/748158075.html\n",
      "正在爬取https://wh.ziroom.com/x/808365203.html\n",
      "正在爬取https://wh.ziroom.com/x/789359116.html\n",
      "正在爬取https://wh.ziroom.com/x/807147182.html\n",
      "正在爬取https://wh.ziroom.com/x/808386399.html\n",
      "正在爬取https://wh.ziroom.com/x/808227366.html\n",
      "正在爬取https://wh.ziroom.com/x/808999697.html\n",
      "正在爬取https://wh.ziroom.com/x/807195384.html\n",
      "正在爬取https://wh.ziroom.com/x/809021432.html\n",
      "正在爬取https://wh.ziroom.com/x/768591804.html\n",
      "正在爬取https://wh.ziroom.com/x/794783453.html\n",
      "正在爬取https://wh.ziroom.com/x/809041375.html\n",
      "正在爬取https://wh.ziroom.com/x/808029931.html\n",
      "正在爬取https://wh.ziroom.com/x/786276165.html\n",
      "正在爬取https://wh.ziroom.com/x/807035518.html\n",
      "正在爬取自如第28页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/787403790.html\n",
      "正在爬取https://wh.ziroom.com/x/809065777.html\n",
      "正在爬取https://wh.ziroom.com/x/764544770.html\n",
      "正在爬取https://wh.ziroom.com/x/807133238.html\n",
      "正在爬取https://wh.ziroom.com/x/807736176.html\n",
      "正在爬取https://wh.ziroom.com/x/796423529.html\n",
      "正在爬取https://wh.ziroom.com/x/748272147.html\n",
      "正在爬取https://wh.ziroom.com/x/756087825.html\n",
      "正在爬取https://wh.ziroom.com/x/807000504.html\n",
      "正在爬取https://wh.ziroom.com/x/807252924.html\n",
      "正在爬取https://wh.ziroom.com/x/743883964.html\n",
      "正在爬取https://wh.ziroom.com/x/808185331.html\n",
      "正在爬取https://wh.ziroom.com/x/795332085.html\n",
      "正在爬取https://wh.ziroom.com/x/772091952.html\n",
      "正在爬取https://wh.ziroom.com/x/777138086.html\n",
      "正在爬取https://wh.ziroom.com/x/809038939.html\n",
      "正在爬取https://wh.ziroom.com/x/809050993.html\n",
      "正在爬取https://wh.ziroom.com/x/760856248.html\n",
      "正在爬取https://wh.ziroom.com/x/750175675.html\n",
      "正在爬取https://wh.ziroom.com/x/808071973.html\n",
      "正在爬取https://wh.ziroom.com/x/745693499.html\n",
      "正在爬取https://wh.ziroom.com/x/807895153.html\n",
      "正在爬取https://wh.ziroom.com/x/809030070.html\n",
      "正在爬取https://wh.ziroom.com/x/807948430.html\n",
      "正在爬取https://wh.ziroom.com/x/756835210.html\n",
      "正在爬取https://wh.ziroom.com/x/808396857.html\n",
      "正在爬取https://wh.ziroom.com/x/807138201.html\n",
      "正在爬取https://wh.ziroom.com/x/794739415.html\n",
      "正在爬取https://wh.ziroom.com/x/808164982.html\n",
      "正在爬取https://wh.ziroom.com/x/788875183.html\n",
      "正在爬取自如第29页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807015351.html\n",
      "正在爬取https://wh.ziroom.com/x/779059462.html\n",
      "正在爬取https://wh.ziroom.com/x/768473076.html\n",
      "正在爬取https://wh.ziroom.com/x/796880690.html\n",
      "正在爬取https://wh.ziroom.com/x/808262079.html\n",
      "正在爬取https://wh.ziroom.com/x/808994300.html\n",
      "正在爬取https://wh.ziroom.com/x/807675192.html\n",
      "正在爬取https://wh.ziroom.com/x/783217852.html\n",
      "正在爬取https://wh.ziroom.com/x/787779374.html\n",
      "正在爬取https://wh.ziroom.com/x/807777952.html\n",
      "正在爬取https://wh.ziroom.com/x/807757533.html\n",
      "正在爬取https://wh.ziroom.com/x/793716550.html\n",
      "正在爬取https://wh.ziroom.com/x/807075446.html\n",
      "正在爬取https://wh.ziroom.com/x/744976960.html\n",
      "正在爬取https://wh.ziroom.com/x/744033926.html\n",
      "正在爬取https://wh.ziroom.com/x/792766920.html\n",
      "正在爬取https://wh.ziroom.com/x/780021023.html\n",
      "正在爬取https://wh.ziroom.com/x/794310869.html\n",
      "正在爬取https://wh.ziroom.com/x/808941723.html\n",
      "正在爬取https://wh.ziroom.com/x/808228031.html\n",
      "正在爬取https://wh.ziroom.com/x/788532579.html\n",
      "正在爬取https://wh.ziroom.com/x/808926701.html\n",
      "正在爬取https://wh.ziroom.com/x/807961534.html\n",
      "正在爬取https://wh.ziroom.com/x/796260084.html\n",
      "正在爬取https://wh.ziroom.com/x/808122597.html\n",
      "正在爬取https://wh.ziroom.com/x/796746248.html\n",
      "正在爬取https://wh.ziroom.com/x/807131264.html\n",
      "正在爬取https://wh.ziroom.com/x/809025779.html\n",
      "正在爬取https://wh.ziroom.com/x/757006124.html\n",
      "正在爬取https://wh.ziroom.com/x/789486283.html\n",
      "正在爬取自如第30页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/809067681.html\n",
      "正在爬取https://wh.ziroom.com/x/809067702.html\n",
      "正在爬取https://wh.ziroom.com/x/781733267.html\n",
      "正在爬取https://wh.ziroom.com/x/796177052.html\n",
      "正在爬取https://wh.ziroom.com/x/807080094.html\n",
      "正在爬取https://wh.ziroom.com/x/766855989.html\n",
      "正在爬取https://wh.ziroom.com/x/808017632.html\n",
      "正在爬取https://wh.ziroom.com/x/807936453.html\n",
      "正在爬取https://wh.ziroom.com/x/780021217.html\n",
      "正在爬取https://wh.ziroom.com/x/809006809.html\n",
      "正在爬取https://wh.ziroom.com/x/782224475.html\n",
      "正在爬取https://wh.ziroom.com/x/807077882.html\n",
      "正在爬取https://wh.ziroom.com/x/807260470.html\n",
      "正在爬取https://wh.ziroom.com/x/765369658.html\n",
      "正在爬取https://wh.ziroom.com/x/780936703.html\n",
      "正在爬取https://wh.ziroom.com/x/770521813.html\n",
      "正在爬取https://wh.ziroom.com/x/763507161.html\n",
      "正在爬取https://wh.ziroom.com/x/751215321.html\n",
      "正在爬取https://wh.ziroom.com/x/796629848.html\n",
      "正在爬取https://wh.ziroom.com/x/739590647.html\n",
      "正在爬取https://wh.ziroom.com/x/784708063.html\n",
      "正在爬取https://wh.ziroom.com/x/808175111.html\n",
      "正在爬取https://wh.ziroom.com/x/807019621.html\n",
      "正在爬取https://wh.ziroom.com/x/808150499.html\n",
      "正在爬取https://wh.ziroom.com/x/795328593.html\n",
      "正在爬取https://wh.ziroom.com/x/807903952.html\n",
      "正在爬取https://wh.ziroom.com/x/745617160.html\n",
      "正在爬取https://wh.ziroom.com/x/808986026.html\n",
      "正在爬取https://wh.ziroom.com/x/809004639.html\n",
      "正在爬取https://wh.ziroom.com/x/808105769.html\n",
      "正在爬取自如第31页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/780889561.html\n",
      "正在爬取https://wh.ziroom.com/x/769200770.html\n",
      "正在爬取https://wh.ziroom.com/x/808371720.html\n",
      "正在爬取https://wh.ziroom.com/x/807925323.html\n",
      "正在爬取https://wh.ziroom.com/x/773611845.html\n",
      "正在爬取https://wh.ziroom.com/x/808957949.html\n",
      "正在爬取https://wh.ziroom.com/x/807931147.html\n",
      "正在爬取https://wh.ziroom.com/x/749273090.html\n",
      "正在爬取https://wh.ziroom.com/x/784068833.html\n",
      "正在爬取https://wh.ziroom.com/x/807091602.html\n",
      "正在爬取https://wh.ziroom.com/x/809026864.html\n",
      "正在爬取https://wh.ziroom.com/x/769559282.html\n",
      "正在爬取https://wh.ziroom.com/x/809016308.html\n",
      "正在爬取https://wh.ziroom.com/x/779481121.html\n",
      "正在爬取https://wh.ziroom.com/x/777254680.html\n",
      "正在爬取https://wh.ziroom.com/x/807822444.html\n",
      "正在爬取https://wh.ziroom.com/x/788210151.html\n",
      "正在爬取https://wh.ziroom.com/x/764410328.html\n",
      "正在爬取https://wh.ziroom.com/x/768775328.html\n",
      "正在爬取https://wh.ziroom.com/x/767904753.html\n",
      "正在爬取https://wh.ziroom.com/x/808157835.html\n",
      "正在爬取https://wh.ziroom.com/x/807786051.html\n",
      "正在爬取https://wh.ziroom.com/x/751691300.html\n",
      "正在爬取https://wh.ziroom.com/x/808998521.html\n",
      "正在爬取https://wh.ziroom.com/x/808209565.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取https://wh.ziroom.com/x/771984379.html\n",
      "正在爬取https://wh.ziroom.com/x/757486856.html\n",
      "正在爬取https://wh.ziroom.com/x/779540873.html\n",
      "正在爬取https://wh.ziroom.com/x/767969452.html\n",
      "正在爬取https://wh.ziroom.com/x/808092322.html\n",
      "正在爬取自如第32页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/777695836.html\n",
      "正在爬取https://wh.ziroom.com/x/781621620.html\n",
      "正在爬取https://wh.ziroom.com/x/752939787.html\n",
      "正在爬取https://wh.ziroom.com/x/808962611.html\n",
      "正在爬取https://wh.ziroom.com/x/767273089.html\n",
      "正在爬取https://wh.ziroom.com/x/762073598.html\n",
      "正在爬取https://wh.ziroom.com/x/789721605.html\n",
      "正在爬取https://wh.ziroom.com/x/770553629.html\n",
      "正在爬取https://wh.ziroom.com/x/777554313.html\n",
      "正在爬取https://wh.ziroom.com/x/787690619.html\n",
      "正在爬取https://wh.ziroom.com/x/788750441.html\n",
      "正在爬取https://wh.ziroom.com/x/763066199.html\n",
      "正在爬取https://wh.ziroom.com/x/765350355.html\n",
      "正在爬取https://wh.ziroom.com/x/796462717.html\n",
      "正在爬取https://wh.ziroom.com/x/808330560.html\n",
      "正在爬取https://wh.ziroom.com/x/794287686.html\n",
      "正在爬取https://wh.ziroom.com/x/809009014.html\n",
      "正在爬取https://wh.ziroom.com/x/808944817.html\n",
      "正在爬取https://wh.ziroom.com/x/808400791.html\n",
      "正在爬取https://wh.ziroom.com/x/808946777.html\n",
      "正在爬取https://wh.ziroom.com/x/808917475.html\n",
      "正在爬取https://wh.ziroom.com/x/769720981.html\n",
      "正在爬取https://wh.ziroom.com/x/809011954.html\n",
      "正在爬取https://wh.ziroom.com/x/767111293.html\n",
      "正在爬取https://wh.ziroom.com/x/808941695.html\n",
      "正在爬取https://wh.ziroom.com/x/795265737.html\n",
      "正在爬取https://wh.ziroom.com/x/807879431.html\n",
      "正在爬取https://wh.ziroom.com/x/807986664.html\n",
      "正在爬取https://wh.ziroom.com/x/788163785.html\n",
      "正在爬取https://wh.ziroom.com/x/746331856.html\n",
      "正在爬取自如第33页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/775578714.html\n",
      "正在爬取https://wh.ziroom.com/x/808966419.html\n",
      "正在爬取https://wh.ziroom.com/x/795636374.html\n",
      "正在爬取https://wh.ziroom.com/x/807251412.html\n",
      "正在爬取https://wh.ziroom.com/x/808334893.html\n",
      "正在爬取https://wh.ziroom.com/x/768325151.html\n",
      "正在爬取https://wh.ziroom.com/x/771349514.html\n",
      "正在爬取https://wh.ziroom.com/x/786386648.html\n",
      "正在爬取https://wh.ziroom.com/x/807800093.html\n",
      "正在爬取https://wh.ziroom.com/x/789323808.html\n",
      "正在爬取https://wh.ziroom.com/x/807748153.html\n",
      "正在爬取https://wh.ziroom.com/x/809005360.html\n",
      "正在爬取https://wh.ziroom.com/x/807253827.html\n",
      "正在爬取https://wh.ziroom.com/x/807748902.html\n",
      "正在爬取https://wh.ziroom.com/x/808036105.html\n",
      "正在爬取https://wh.ziroom.com/x/807322756.html\n",
      "正在爬取https://wh.ziroom.com/x/781192783.html\n",
      "正在爬取https://wh.ziroom.com/x/761034825.html\n",
      "正在爬取https://wh.ziroom.com/x/767457389.html\n",
      "正在爬取https://wh.ziroom.com/x/741161853.html\n",
      "正在爬取https://wh.ziroom.com/x/790703342.html\n",
      "正在爬取https://wh.ziroom.com/x/775938778.html\n",
      "正在爬取https://wh.ziroom.com/x/769462476.html\n",
      "正在爬取https://wh.ziroom.com/x/809074177.html\n",
      "正在爬取https://wh.ziroom.com/x/807979615.html\n",
      "正在爬取https://wh.ziroom.com/x/808299417.html\n",
      "正在爬取https://wh.ziroom.com/x/796078403.html\n",
      "正在爬取https://wh.ziroom.com/x/807893025.html\n",
      "正在爬取https://wh.ziroom.com/x/775813454.html\n",
      "正在爬取https://wh.ziroom.com/x/787632322.html\n",
      "正在爬取自如第34页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/808973048.html\n",
      "正在爬取https://wh.ziroom.com/x/808001784.html\n",
      "正在爬取https://wh.ziroom.com/x/808380827.html\n",
      "正在爬取https://wh.ziroom.com/x/787737276.html\n",
      "正在爬取https://wh.ziroom.com/x/771744498.html\n",
      "正在爬取https://wh.ziroom.com/x/809052099.html\n",
      "正在爬取https://wh.ziroom.com/x/808188495.html\n",
      "正在爬取https://wh.ziroom.com/x/751031021.html\n",
      "正在爬取https://wh.ziroom.com/x/807088767.html\n",
      "正在爬取https://wh.ziroom.com/x/781348274.html\n",
      "正在爬取https://wh.ziroom.com/x/807823011.html\n",
      "正在爬取https://wh.ziroom.com/x/758749214.html\n",
      "正在爬取https://wh.ziroom.com/x/809024554.html\n",
      "正在爬取https://wh.ziroom.com/x/808972425.html\n",
      "正在爬取https://wh.ziroom.com/x/780974339.html\n",
      "正在爬取https://wh.ziroom.com/x/780252950.html\n",
      "正在爬取https://wh.ziroom.com/x/768711502.html\n",
      "正在爬取https://wh.ziroom.com/x/808190336.html\n",
      "正在爬取https://wh.ziroom.com/x/807799974.html\n",
      "正在爬取https://wh.ziroom.com/x/807758646.html\n",
      "正在爬取https://wh.ziroom.com/x/807836129.html\n",
      "正在爬取https://wh.ziroom.com/x/807064267.html\n",
      "正在爬取https://wh.ziroom.com/x/780873362.html\n",
      "正在爬取https://wh.ziroom.com/x/807056651.html\n",
      "正在爬取https://wh.ziroom.com/x/752483693.html\n",
      "正在爬取https://wh.ziroom.com/x/807058142.html\n",
      "正在爬取https://wh.ziroom.com/x/744883646.html\n",
      "正在爬取https://wh.ziroom.com/x/809066820.html\n",
      "正在爬取https://wh.ziroom.com/x/748494374.html\n",
      "正在爬取https://wh.ziroom.com/x/808032227.html\n",
      "正在爬取自如第35页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807167706.html\n",
      "正在爬取https://wh.ziroom.com/x/809075703.html\n",
      "正在爬取https://wh.ziroom.com/x/779374615.html\n",
      "正在爬取https://wh.ziroom.com/x/795342561.html\n",
      "正在爬取https://wh.ziroom.com/x/792128369.html\n",
      "正在爬取https://wh.ziroom.com/x/808946756.html\n",
      "正在爬取https://wh.ziroom.com/x/809011975.html\n",
      "正在爬取https://wh.ziroom.com/x/776865710.html\n",
      "正在爬取https://wh.ziroom.com/x/742663510.html\n",
      "正在爬取https://wh.ziroom.com/x/760594154.html\n",
      "正在爬取https://wh.ziroom.com/x/808909565.html\n",
      "正在爬取https://wh.ziroom.com/x/737429196.html\n",
      "正在爬取https://wh.ziroom.com/x/763200253.html\n",
      "正在爬取https://wh.ziroom.com/x/807797706.html\n",
      "正在爬取https://wh.ziroom.com/x/738398420.html\n",
      "正在爬取https://wh.ziroom.com/x/808122310.html\n",
      "正在爬取https://wh.ziroom.com/x/753147464.html\n",
      "正在爬取https://wh.ziroom.com/x/743980576.html\n",
      "正在爬取https://wh.ziroom.com/x/754904716.html\n",
      "正在爬取https://wh.ziroom.com/x/807954681.html\n",
      "正在爬取https://wh.ziroom.com/x/786517307.html\n",
      "正在爬取https://wh.ziroom.com/x/807172998.html\n",
      "正在爬取https://wh.ziroom.com/x/766454021.html\n",
      "正在爬取https://wh.ziroom.com/x/777947939.html\n",
      "正在爬取https://wh.ziroom.com/x/808127469.html\n",
      "正在爬取https://wh.ziroom.com/x/782110112.html\n",
      "正在爬取https://wh.ziroom.com/x/792626076.html\n",
      "正在爬取https://wh.ziroom.com/x/780485944.html\n",
      "正在爬取https://wh.ziroom.com/x/778888645.html\n",
      "正在爬取https://wh.ziroom.com/x/808022224.html\n",
      "正在爬取自如第36页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/807912772.html\n",
      "正在爬取https://wh.ziroom.com/x/808119370.html\n",
      "正在爬取https://wh.ziroom.com/x/808106875.html\n",
      "正在爬取https://wh.ziroom.com/x/807930139.html\n",
      "正在爬取https://wh.ziroom.com/x/807930573.html\n",
      "正在爬取https://wh.ziroom.com/x/808084328.html\n",
      "正在爬取https://wh.ziroom.com/x/796912991.html\n",
      "正在爬取https://wh.ziroom.com/x/751495651.html\n",
      "正在爬取https://wh.ziroom.com/x/752932512.html\n",
      "正在爬取https://wh.ziroom.com/x/809030091.html\n",
      "正在爬取https://wh.ziroom.com/x/764321670.html\n",
      "正在爬取https://wh.ziroom.com/x/794665501.html\n",
      "正在爬取https://wh.ziroom.com/x/782661751.html\n",
      "正在爬取https://wh.ziroom.com/x/807355859.html\n",
      "正在爬取https://wh.ziroom.com/x/776330076.html\n",
      "正在爬取https://wh.ziroom.com/x/809014992.html\n",
      "正在爬取https://wh.ziroom.com/x/768644475.html\n",
      "正在爬取https://wh.ziroom.com/x/745081720.html\n",
      "正在爬取https://wh.ziroom.com/x/808974938.html\n",
      "正在爬取https://wh.ziroom.com/x/770530349.html\n",
      "正在爬取https://wh.ziroom.com/x/745692820.html\n",
      "正在爬取https://wh.ziroom.com/x/807948871.html\n",
      "正在爬取https://wh.ziroom.com/x/770917379.html\n",
      "正在爬取https://wh.ziroom.com/x/746542346.html\n",
      "正在爬取https://wh.ziroom.com/x/808227359.html\n",
      "正在爬取https://wh.ziroom.com/x/808993355.html\n",
      "正在爬取https://wh.ziroom.com/x/807900669.html\n",
      "正在爬取https://wh.ziroom.com/x/808047109.html\n",
      "正在爬取https://wh.ziroom.com/x/807061698.html\n",
      "正在爬取https://wh.ziroom.com/x/746672326.html\n",
      "正在爬取自如第37页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/808396206.html\n",
      "正在爬取https://wh.ziroom.com/x/807141435.html\n",
      "正在爬取https://wh.ziroom.com/x/807950705.html\n",
      "正在爬取https://wh.ziroom.com/x/808363355.html\n",
      "正在爬取https://wh.ziroom.com/x/750186345.html\n",
      "正在爬取https://wh.ziroom.com/x/809072210.html\n",
      "正在爬取https://wh.ziroom.com/x/795249247.html\n",
      "正在爬取https://wh.ziroom.com/x/808980657.html\n",
      "正在爬取https://wh.ziroom.com/x/756043302.html\n",
      "正在爬取https://wh.ziroom.com/x/789702205.html\n",
      "正在爬取https://wh.ziroom.com/x/782836739.html\n",
      "正在爬取https://wh.ziroom.com/x/769000271.html\n",
      "正在爬取https://wh.ziroom.com/x/808177190.html\n",
      "正在爬取https://wh.ziroom.com/x/792305200.html\n",
      "正在爬取https://wh.ziroom.com/x/769720690.html\n",
      "正在爬取https://wh.ziroom.com/x/807726509.html\n",
      "正在爬取https://wh.ziroom.com/x/759897888.html\n",
      "正在爬取https://wh.ziroom.com/x/807338618.html\n",
      "正在爬取https://wh.ziroom.com/x/773723686.html\n",
      "正在爬取https://wh.ziroom.com/x/787350149.html\n",
      "正在爬取https://wh.ziroom.com/x/738085886.html\n",
      "正在爬取https://wh.ziroom.com/x/780573438.html\n",
      "正在爬取https://wh.ziroom.com/x/808023288.html\n",
      "正在爬取https://wh.ziroom.com/x/755374196.html\n",
      "正在爬取https://wh.ziroom.com/x/747703242.html\n",
      "正在爬取https://wh.ziroom.com/x/808043917.html\n",
      "正在爬取https://wh.ziroom.com/x/807642012.html\n",
      "正在爬取https://wh.ziroom.com/x/767958588.html\n",
      "正在爬取https://wh.ziroom.com/x/782308865.html\n",
      "正在爬取https://wh.ziroom.com/x/808905757.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取自如第38页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/756507932.html\n",
      "正在爬取https://wh.ziroom.com/x/807939001.html\n",
      "正在爬取https://wh.ziroom.com/x/807825160.html\n",
      "正在爬取https://wh.ziroom.com/x/778821618.html\n",
      "正在爬取https://wh.ziroom.com/x/747300595.html\n",
      "正在爬取https://wh.ziroom.com/x/808371692.html\n",
      "正在爬取https://wh.ziroom.com/x/808970227.html\n",
      "正在爬取https://wh.ziroom.com/x/787892573.html\n",
      "正在爬取https://wh.ziroom.com/x/783306898.html\n",
      "正在爬取https://wh.ziroom.com/x/807882763.html\n",
      "正在爬取https://wh.ziroom.com/x/809037455.html\n",
      "正在爬取https://wh.ziroom.com/x/808395401.html\n",
      "正在爬取https://wh.ziroom.com/x/794971730.html\n",
      "正在爬取https://wh.ziroom.com/x/807317380.html\n",
      "正在爬取https://wh.ziroom.com/x/790427183.html\n",
      "正在爬取https://wh.ziroom.com/x/748242271.html\n",
      "正在爬取https://wh.ziroom.com/x/807899591.html\n",
      "正在爬取https://wh.ziroom.com/x/807101101.html\n",
      "正在爬取https://wh.ziroom.com/x/808350314.html\n",
      "正在爬取https://wh.ziroom.com/x/809033913.html\n",
      "正在爬取https://wh.ziroom.com/x/781625112.html\n",
      "正在爬取https://wh.ziroom.com/x/764288302.html\n",
      "正在爬取https://wh.ziroom.com/x/807136451.html\n",
      "正在爬取https://wh.ziroom.com/x/780844068.html\n",
      "正在爬取https://wh.ziroom.com/x/781490185.html\n",
      "正在爬取https://wh.ziroom.com/x/807721378.html\n",
      "正在爬取https://wh.ziroom.com/x/782506163.html\n",
      "正在爬取https://wh.ziroom.com/x/773216764.html\n",
      "正在爬取https://wh.ziroom.com/x/759125768.html\n",
      "正在爬取https://wh.ziroom.com/x/781491834.html\n",
      "正在爬取自如第39页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/809038120.html\n",
      "正在爬取https://wh.ziroom.com/x/737887133.html\n",
      "正在爬取https://wh.ziroom.com/x/808082382.html\n",
      "正在爬取https://wh.ziroom.com/x/786653398.html\n",
      "正在爬取https://wh.ziroom.com/x/807984277.html\n",
      "正在爬取https://wh.ziroom.com/x/788223634.html\n",
      "正在爬取https://wh.ziroom.com/x/808098125.html\n",
      "正在爬取https://wh.ziroom.com/x/808006971.html\n",
      "正在爬取https://wh.ziroom.com/x/777438883.html\n",
      "正在爬取https://wh.ziroom.com/x/808194599.html\n",
      "正在爬取https://wh.ziroom.com/x/751215806.html\n",
      "正在爬取https://wh.ziroom.com/x/807106274.html\n",
      "正在爬取https://wh.ziroom.com/x/808085539.html\n",
      "正在爬取https://wh.ziroom.com/x/736116786.html\n",
      "正在爬取https://wh.ziroom.com/x/807992404.html\n",
      "正在爬取https://wh.ziroom.com/x/775655247.html\n",
      "正在爬取https://wh.ziroom.com/x/808224678.html\n",
      "正在爬取https://wh.ziroom.com/x/807753662.html\n",
      "正在爬取https://wh.ziroom.com/x/743375684.html\n",
      "正在爬取https://wh.ziroom.com/x/778468441.html\n",
      "正在爬取https://wh.ziroom.com/x/808391236.html\n",
      "正在爬取https://wh.ziroom.com/x/808953385.html\n",
      "正在爬取https://wh.ziroom.com/x/808225455.html\n",
      "正在爬取https://wh.ziroom.com/x/777141966.html\n",
      "正在爬取https://wh.ziroom.com/x/809037476.html\n",
      "正在爬取https://wh.ziroom.com/x/743979315.html\n",
      "正在爬取https://wh.ziroom.com/x/809008993.html\n",
      "正在爬取https://wh.ziroom.com/x/808941674.html\n",
      "正在爬取https://wh.ziroom.com/x/766057776.html\n",
      "正在爬取https://wh.ziroom.com/x/735511506.html\n",
      "正在爬取自如第40页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/759690308.html\n",
      "正在爬取https://wh.ziroom.com/x/782598410.html\n",
      "正在爬取https://wh.ziroom.com/x/760040963.html\n",
      "正在爬取https://wh.ziroom.com/x/808949409.html\n",
      "正在爬取https://wh.ziroom.com/x/807795221.html\n",
      "正在爬取https://wh.ziroom.com/x/786107191.html\n",
      "正在爬取https://wh.ziroom.com/x/808958908.html\n",
      "正在爬取https://wh.ziroom.com/x/796554382.html\n",
      "正在爬取https://wh.ziroom.com/x/807983451.html\n",
      "正在爬取https://wh.ziroom.com/x/774138943.html\n",
      "正在爬取https://wh.ziroom.com/x/808914304.html\n",
      "正在爬取https://wh.ziroom.com/x/750365213.html\n",
      "正在爬取https://wh.ziroom.com/x/808040256.html\n",
      "正在爬取https://wh.ziroom.com/x/794287492.html\n",
      "正在爬取https://wh.ziroom.com/x/807930160.html\n",
      "正在爬取https://wh.ziroom.com/x/809038967.html\n",
      "正在爬取https://wh.ziroom.com/x/793661066.html\n",
      "正在爬取https://wh.ziroom.com/x/808162805.html\n",
      "正在爬取https://wh.ziroom.com/x/780756962.html\n",
      "正在爬取https://wh.ziroom.com/x/769739120.html\n",
      "正在爬取https://wh.ziroom.com/x/809016728.html\n",
      "正在爬取https://wh.ziroom.com/x/807777742.html\n",
      "正在爬取https://wh.ziroom.com/x/807919611.html\n",
      "正在爬取https://wh.ziroom.com/x/808251684.html\n",
      "正在爬取https://wh.ziroom.com/x/808340255.html\n",
      "正在爬取https://wh.ziroom.com/x/766566541.html\n",
      "正在爬取https://wh.ziroom.com/x/770241677.html\n",
      "正在爬取https://wh.ziroom.com/x/808258873.html\n",
      "正在爬取https://wh.ziroom.com/x/757494713.html\n",
      "正在爬取https://wh.ziroom.com/x/792105865.html\n",
      "正在爬取自如第41页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/808394323.html\n",
      "正在爬取https://wh.ziroom.com/x/787847274.html\n",
      "正在爬取https://wh.ziroom.com/x/808047578.html\n",
      "正在爬取https://wh.ziroom.com/x/754198071.html\n",
      "正在爬取https://wh.ziroom.com/x/781367771.html\n",
      "正在爬取https://wh.ziroom.com/x/780220164.html\n",
      "正在爬取https://wh.ziroom.com/x/769502828.html\n",
      "正在爬取https://wh.ziroom.com/x/808982582.html\n",
      "正在爬取https://wh.ziroom.com/x/743957005.html\n",
      "正在爬取https://wh.ziroom.com/x/796897859.html\n",
      "正在爬取https://wh.ziroom.com/x/808992312.html\n",
      "正在爬取https://wh.ziroom.com/x/808061074.html\n",
      "正在爬取https://wh.ziroom.com/x/749738205.html\n",
      "正在爬取https://wh.ziroom.com/x/809059246.html\n",
      "正在爬取https://wh.ziroom.com/x/756041265.html\n",
      "正在爬取https://wh.ziroom.com/x/808364314.html\n",
      "正在爬取https://wh.ziroom.com/x/807116928.html\n",
      "正在爬取https://wh.ziroom.com/x/795042249.html\n",
      "正在爬取https://wh.ziroom.com/x/757086246.html\n",
      "正在爬取https://wh.ziroom.com/x/783118039.html\n",
      "正在爬取https://wh.ziroom.com/x/767976242.html\n",
      "正在爬取https://wh.ziroom.com/x/807232225.html\n",
      "正在爬取https://wh.ziroom.com/x/790425146.html\n",
      "正在爬取https://wh.ziroom.com/x/735404224.html\n",
      "正在爬取https://wh.ziroom.com/x/780972981.html\n",
      "正在爬取https://wh.ziroom.com/x/792269795.html\n",
      "正在爬取https://wh.ziroom.com/x/781338186.html\n",
      "正在爬取https://wh.ziroom.com/x/751781413.html\n",
      "正在爬取https://wh.ziroom.com/x/809063047.html\n",
      "正在爬取https://wh.ziroom.com/x/808395261.html\n",
      "正在爬取自如第42页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/808395261.html\n",
      "正在爬取https://wh.ziroom.com/x/808205806.html\n",
      "正在爬取https://wh.ziroom.com/x/807669732.html\n",
      "正在爬取https://wh.ziroom.com/x/754460359.html\n",
      "正在爬取https://wh.ziroom.com/x/786287320.html\n",
      "正在爬取https://wh.ziroom.com/x/808091902.html\n",
      "正在爬取https://wh.ziroom.com/x/771896594.html\n",
      "正在爬取https://wh.ziroom.com/x/784194933.html\n",
      "正在爬取https://wh.ziroom.com/x/743609939.html\n",
      "正在爬取https://wh.ziroom.com/x/762288647.html\n",
      "正在爬取https://wh.ziroom.com/x/762771610.html\n",
      "正在爬取https://wh.ziroom.com/x/807715582.html\n",
      "正在爬取https://wh.ziroom.com/x/807723821.html\n",
      "正在爬取https://wh.ziroom.com/x/807965104.html\n",
      "正在爬取https://wh.ziroom.com/x/808078322.html\n",
      "正在爬取https://wh.ziroom.com/x/744472075.html\n",
      "正在爬取https://wh.ziroom.com/x/808325828.html\n",
      "正在爬取https://wh.ziroom.com/x/755359161.html\n",
      "正在爬取https://wh.ziroom.com/x/808060493.html\n",
      "正在爬取https://wh.ziroom.com/x/770111600.html\n",
      "正在爬取https://wh.ziroom.com/x/807669081.html\n",
      "正在爬取https://wh.ziroom.com/x/751182147.html\n",
      "正在爬取https://wh.ziroom.com/x/807795711.html\n",
      "正在爬取https://wh.ziroom.com/x/786258414.html\n",
      "正在爬取https://wh.ziroom.com/x/771849452.html\n",
      "正在爬取https://wh.ziroom.com/x/808087667.html\n",
      "正在爬取https://wh.ziroom.com/x/734985863.html\n",
      "正在爬取https://wh.ziroom.com/x/791781594.html\n",
      "正在爬取https://wh.ziroom.com/x/808046374.html\n",
      "正在爬取https://wh.ziroom.com/x/808233848.html\n",
      "正在爬取自如第43页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/778582707.html\n",
      "正在爬取https://wh.ziroom.com/x/807281785.html\n",
      "正在爬取https://wh.ziroom.com/x/808949094.html\n",
      "正在爬取https://wh.ziroom.com/x/807374318.html\n",
      "正在爬取https://wh.ziroom.com/x/736449981.html\n",
      "正在爬取https://wh.ziroom.com/x/809039506.html\n",
      "正在爬取https://wh.ziroom.com/x/808235472.html\n",
      "正在爬取https://wh.ziroom.com/x/808921570.html\n",
      "正在爬取https://wh.ziroom.com/x/767795822.html\n",
      "正在爬取https://wh.ziroom.com/x/747007752.html\n",
      "正在爬取https://wh.ziroom.com/x/793710148.html\n",
      "正在爬取https://wh.ziroom.com/x/808201753.html\n",
      "正在爬取https://wh.ziroom.com/x/807444304.html\n",
      "正在爬取https://wh.ziroom.com/x/807745192.html\n",
      "正在爬取https://wh.ziroom.com/x/780140527.html\n",
      "正在爬取https://wh.ziroom.com/x/775871751.html\n",
      "正在爬取https://wh.ziroom.com/x/736844965.html\n",
      "正在爬取https://wh.ziroom.com/x/807760151.html\n",
      "正在爬取https://wh.ziroom.com/x/787304462.html\n",
      "正在爬取https://wh.ziroom.com/x/786363756.html\n",
      "正在爬取https://wh.ziroom.com/x/783994046.html\n",
      "正在爬取https://wh.ziroom.com/x/792843356.html\n",
      "正在爬取https://wh.ziroom.com/x/807096782.html\n",
      "正在爬取https://wh.ziroom.com/x/772537473.html\n",
      "正在爬取https://wh.ziroom.com/x/807985306.html\n",
      "正在爬取https://wh.ziroom.com/x/751041885.html\n",
      "正在爬取https://wh.ziroom.com/x/808938482.html\n",
      "正在爬取https://wh.ziroom.com/x/807042259.html\n",
      "正在爬取https://wh.ziroom.com/x/754034238.html\n",
      "正在爬取https://wh.ziroom.com/x/808059968.html\n",
      "正在爬取自如第44页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/780541331.html\n",
      "正在爬取https://wh.ziroom.com/x/744972207.html\n",
      "正在爬取https://wh.ziroom.com/x/755583134.html\n",
      "正在爬取https://wh.ziroom.com/x/807071078.html\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在爬取https://wh.ziroom.com/x/807558285.html\n",
      "正在爬取https://wh.ziroom.com/x/780487205.html\n",
      "正在爬取https://wh.ziroom.com/x/808306816.html\n",
      "正在爬取https://wh.ziroom.com/x/791448011.html\n",
      "正在爬取https://wh.ziroom.com/x/775813745.html\n",
      "正在爬取https://wh.ziroom.com/x/780580907.html\n",
      "正在爬取https://wh.ziroom.com/x/808909544.html\n",
      "正在爬取https://wh.ziroom.com/x/808978158.html\n",
      "正在爬取https://wh.ziroom.com/x/809044882.html\n",
      "正在爬取https://wh.ziroom.com/x/780486914.html\n",
      "正在爬取https://wh.ziroom.com/x/809019003.html\n",
      "正在爬取https://wh.ziroom.com/x/808317911.html\n",
      "正在爬取https://wh.ziroom.com/x/807930846.html\n",
      "正在爬取https://wh.ziroom.com/x/793710439.html\n",
      "正在爬取https://wh.ziroom.com/x/744895092.html\n",
      "正在爬取https://wh.ziroom.com/x/808338407.html\n",
      "正在爬取https://wh.ziroom.com/x/796557292.html\n",
      "正在爬取https://wh.ziroom.com/x/748203180.html\n",
      "正在爬取https://wh.ziroom.com/x/784368466.html\n",
      "正在爬取https://wh.ziroom.com/x/793753701.html\n",
      "正在爬取https://wh.ziroom.com/x/771208379.html\n",
      "正在爬取https://wh.ziroom.com/x/781596497.html\n",
      "正在爬取https://wh.ziroom.com/x/809048137.html\n",
      "正在爬取https://wh.ziroom.com/x/752931251.html\n",
      "正在爬取https://wh.ziroom.com/x/750014752.html\n",
      "正在爬取https://wh.ziroom.com/x/777118589.html\n",
      "正在爬取自如第45页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/779930425.html\n",
      "正在爬取https://wh.ziroom.com/x/807273091.html\n",
      "正在爬取https://wh.ziroom.com/x/777875286.html\n",
      "正在爬取https://wh.ziroom.com/x/743172760.html\n",
      "正在爬取https://wh.ziroom.com/x/781337992.html\n",
      "正在爬取https://wh.ziroom.com/x/790181094.html\n",
      "正在爬取https://wh.ziroom.com/x/807265895.html\n",
      "正在爬取https://wh.ziroom.com/x/738970429.html\n",
      "正在爬取https://wh.ziroom.com/x/808134623.html\n",
      "正在爬取https://wh.ziroom.com/x/807178178.html\n",
      "正在爬取https://wh.ziroom.com/x/807821814.html\n",
      "正在爬取https://wh.ziroom.com/x/743790650.html\n",
      "正在爬取https://wh.ziroom.com/x/785875846.html\n",
      "正在爬取https://wh.ziroom.com/x/807289184.html\n",
      "正在爬取https://wh.ziroom.com/x/750746617.html\n",
      "正在爬取https://wh.ziroom.com/x/809012150.html\n",
      "正在爬取https://wh.ziroom.com/x/809013032.html\n",
      "正在爬取https://wh.ziroom.com/x/793917340.html\n",
      "正在爬取https://wh.ziroom.com/x/785508798.html\n",
      "正在爬取https://wh.ziroom.com/x/781733073.html\n",
      "正在爬取https://wh.ziroom.com/x/807105868.html\n",
      "正在爬取https://wh.ziroom.com/x/808021020.html\n",
      "正在爬取https://wh.ziroom.com/x/742334583.html\n",
      "正在爬取https://wh.ziroom.com/x/809060177.html\n",
      "正在爬取https://wh.ziroom.com/x/808399643.html\n",
      "正在爬取https://wh.ziroom.com/x/809041382.html\n",
      "正在爬取https://wh.ziroom.com/x/740770264.html\n",
      "正在爬取https://wh.ziroom.com/x/770298810.html\n",
      "正在爬取https://wh.ziroom.com/x/807056644.html\n",
      "正在爬取https://wh.ziroom.com/x/808952216.html\n",
      "正在爬取自如第46页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/769143831.html\n",
      "正在爬取https://wh.ziroom.com/x/807979034.html\n",
      "正在爬取https://wh.ziroom.com/x/808303302.html\n",
      "正在爬取https://wh.ziroom.com/x/788590294.html\n",
      "正在爬取https://wh.ziroom.com/x/785322461.html\n",
      "正在爬取https://wh.ziroom.com/x/771984476.html\n",
      "正在爬取https://wh.ziroom.com/x/808920303.html\n",
      "正在爬取https://wh.ziroom.com/x/789344663.html\n",
      "正在爬取https://wh.ziroom.com/x/746459605.html\n",
      "正在爬取https://wh.ziroom.com/x/787737373.html\n",
      "正在爬取https://wh.ziroom.com/x/758161782.html\n",
      "正在爬取https://wh.ziroom.com/x/780581586.html\n",
      "正在爬取https://wh.ziroom.com/x/747321547.html\n",
      "正在爬取https://wh.ziroom.com/x/794352967.html\n",
      "正在爬取https://wh.ziroom.com/x/781683215.html\n",
      "正在爬取https://wh.ziroom.com/x/759689532.html\n",
      "正在爬取https://wh.ziroom.com/x/808019935.html\n",
      "正在爬取https://wh.ziroom.com/x/808038331.html\n",
      "正在爬取https://wh.ziroom.com/x/808998304.html\n",
      "正在爬取https://wh.ziroom.com/x/792553326.html\n",
      "正在爬取https://wh.ziroom.com/x/794800428.html\n",
      "正在爬取https://wh.ziroom.com/x/808208571.html\n",
      "正在爬取https://wh.ziroom.com/x/785472520.html\n",
      "正在爬取https://wh.ziroom.com/x/808031387.html\n",
      "正在爬取https://wh.ziroom.com/x/807882749.html\n",
      "正在爬取https://wh.ziroom.com/x/750016401.html\n",
      "正在爬取https://wh.ziroom.com/x/809039667.html\n",
      "正在爬取https://wh.ziroom.com/x/807227906.html\n",
      "正在爬取https://wh.ziroom.com/x/784739394.html\n",
      "正在爬取https://wh.ziroom.com/x/796833839.html\n",
      "正在爬取自如第47页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/809001538.html\n",
      "正在爬取https://wh.ziroom.com/x/794971439.html\n",
      "正在爬取https://wh.ziroom.com/x/808009680.html\n",
      "正在爬取https://wh.ziroom.com/x/807673540.html\n",
      "正在爬取https://wh.ziroom.com/x/809065749.html\n",
      "正在爬取https://wh.ziroom.com/x/807923076.html\n",
      "正在爬取https://wh.ziroom.com/x/745862764.html\n",
      "正在爬取https://wh.ziroom.com/x/749482319.html\n",
      "正在爬取https://wh.ziroom.com/x/768052872.html\n",
      "正在爬取https://wh.ziroom.com/x/809030077.html\n",
      "正在爬取https://wh.ziroom.com/x/807163212.html\n",
      "正在爬取https://wh.ziroom.com/x/739852547.html\n",
      "正在爬取https://wh.ziroom.com/x/756805528.html\n",
      "正在爬取https://wh.ziroom.com/x/807976920.html\n",
      "正在爬取https://wh.ziroom.com/x/808271788.html\n",
      "正在爬取https://wh.ziroom.com/x/753019036.html\n",
      "正在爬取https://wh.ziroom.com/x/807966364.html\n",
      "正在爬取https://wh.ziroom.com/x/778309361.html\n",
      "正在爬取https://wh.ziroom.com/x/809041697.html\n",
      "正在爬取https://wh.ziroom.com/x/808944999.html\n",
      "正在爬取https://wh.ziroom.com/x/807247975.html\n",
      "正在爬取https://wh.ziroom.com/x/793622169.html\n",
      "正在爬取https://wh.ziroom.com/x/808060521.html\n",
      "正在爬取https://wh.ziroom.com/x/796634213.html\n",
      "正在爬取https://wh.ziroom.com/x/807098112.html\n",
      "正在爬取https://wh.ziroom.com/x/775532930.html\n",
      "正在爬取https://wh.ziroom.com/x/808244376.html\n",
      "正在爬取https://wh.ziroom.com/x/744708561.html\n",
      "正在爬取https://wh.ziroom.com/x/808915662.html\n",
      "正在爬取https://wh.ziroom.com/x/785807849.html\n",
      "正在爬取自如第48页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/763090643.html\n",
      "正在爬取https://wh.ziroom.com/x/808917454.html\n",
      "正在爬取https://wh.ziroom.com/x/781149521.html\n",
      "正在爬取https://wh.ziroom.com/x/807643307.html\n",
      "正在爬取https://wh.ziroom.com/x/796434878.html\n",
      "正在爬取https://wh.ziroom.com/x/767010219.html\n",
      "正在爬取https://wh.ziroom.com/x/809008720.html\n",
      "正在爬取https://wh.ziroom.com/x/807922740.html\n",
      "正在爬取https://wh.ziroom.com/x/786833915.html\n",
      "正在爬取https://wh.ziroom.com/x/781035158.html\n",
      "正在爬取https://wh.ziroom.com/x/769131706.html\n",
      "正在爬取https://wh.ziroom.com/x/749584363.html\n",
      "正在爬取https://wh.ziroom.com/x/758708959.html\n",
      "正在爬取https://wh.ziroom.com/x/735549045.html\n",
      "正在爬取https://wh.ziroom.com/x/781550713.html\n",
      "正在爬取https://wh.ziroom.com/x/807805665.html\n",
      "正在爬取https://wh.ziroom.com/x/774643828.html\n",
      "正在爬取https://wh.ziroom.com/x/807878780.html\n",
      "正在爬取https://wh.ziroom.com/x/793540980.html\n",
      "正在爬取https://wh.ziroom.com/x/807811160.html\n",
      "正在爬取https://wh.ziroom.com/x/744532991.html\n",
      "正在爬取https://wh.ziroom.com/x/808013159.html\n",
      "正在爬取https://wh.ziroom.com/x/808023113.html\n",
      "正在爬取https://wh.ziroom.com/x/808999123.html\n",
      "正在爬取https://wh.ziroom.com/x/785849850.html\n",
      "正在爬取https://wh.ziroom.com/x/783605561.html\n",
      "正在爬取https://wh.ziroom.com/x/766054284.html\n",
      "正在爬取https://wh.ziroom.com/x/807116200.html\n",
      "正在爬取https://wh.ziroom.com/x/808015336.html\n",
      "正在爬取https://wh.ziroom.com/x/759860446.html\n",
      "正在爬取自如第49页\n",
      "有点累了，需要休息一下啦（￢㉨￢）\n",
      "开始干活咯(๑>؂<๑）\n",
      "正在爬取https://wh.ziroom.com/x/757517217.html\n",
      "正在爬取https://wh.ziroom.com/x/740359178.html\n",
      "正在爬取https://wh.ziroom.com/x/775373850.html\n",
      "正在爬取https://wh.ziroom.com/x/808214367.html\n",
      "正在爬取https://wh.ziroom.com/x/769365767.html\n",
      "正在爬取https://wh.ziroom.com/x/774858974.html\n",
      "正在爬取https://wh.ziroom.com/x/794808091.html\n",
      "正在爬取https://wh.ziroom.com/x/807995547.html\n",
      "正在爬取https://wh.ziroom.com/x/749149803.html\n",
      "正在爬取https://wh.ziroom.com/x/793031827.html\n",
      "正在爬取https://wh.ziroom.com/x/760140388.html\n",
      "正在爬取https://wh.ziroom.com/x/780936800.html\n",
      "正在爬取https://wh.ziroom.com/x/791790130.html\n",
      "正在爬取https://wh.ziroom.com/x/761723331.html\n",
      "正在爬取https://wh.ziroom.com/x/747828081.html\n",
      "正在爬取https://wh.ziroom.com/x/780229379.html\n",
      "正在爬取https://wh.ziroom.com/x/750397320.html\n",
      "正在爬取https://wh.ziroom.com/x/790315148.html\n",
      "正在爬取https://wh.ziroom.com/x/762521738.html\n",
      "正在爬取https://wh.ziroom.com/x/807992768.html\n",
      "正在爬取https://wh.ziroom.com/x/808145697.html\n",
      "正在爬取https://wh.ziroom.com/x/764284131.html\n",
      "正在爬取https://wh.ziroom.com/x/779499551.html\n",
      "正在爬取https://wh.ziroom.com/x/754845546.html\n",
      "正在爬取https://wh.ziroom.com/x/767159502.html\n",
      "正在爬取https://wh.ziroom.com/x/752372434.html\n",
      "正在爬取https://wh.ziroom.com/x/763197634.html\n",
      "正在爬取https://wh.ziroom.com/x/794426105.html\n",
      "正在爬取https://wh.ziroom.com/x/791715828.html\n",
      "正在爬取https://wh.ziroom.com/x/807023205.html\n"
     ]
    }
   ],
   "source": [
    "import requests\n",
    "from bs4 import BeautifulSoup\n",
    "import random\n",
    "import time\n",
    "import csv\n",
    "\n",
    "#这里增加了很多user_agent\n",
    "#能一定程度能保护爬虫\n",
    "user_agent = [\n",
    "    \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50\",\n",
    "    \"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50\",\n",
    "    \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0\",\n",
    "    \"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3; rv:11.0) like Gecko\",\n",
    "    \"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\",\n",
    "    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\",\n",
    "    \"Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\",\n",
    "    \"Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11\",\n",
    "    \"Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11\",\n",
    "    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)\"]\n",
    "\n",
    "def get_info():\n",
    "    csvheader=['名称','面积','朝向','户型','位置','楼层','是否有电梯','建成时间',' 门锁','绿化']\n",
    "    with open('wuhan_ziru.csv', 'a+', newline='') as csvfile:\n",
    "        writer  = csv.writer(csvfile)\n",
    "        writer.writerow(csvheader)\n",
    "        for i in range(1,50):  #总共有50页\n",
    "            print('正在爬取自如第%s页'%i)\n",
    "            timelist=[1,2,3]\n",
    "            print('有点累了，需要休息一下啦（￢㉨￢）')\n",
    "            time.sleep(random.choice(timelist))   #休息1-3秒，防止给对方服务器过大的压力！！！\n",
    "            url='https://wh.ziroom.com/z/p%s/'%i\n",
    "            headers = {'User-Agent': random.choice(user_agent)}\n",
    "            r = requests.get(url, headers=headers)\n",
    "            r.encoding = r.apparent_encoding\n",
    "            soup = BeautifulSoup(r.text, 'lxml')\n",
    "            all_info = soup.find_all('div', class_='info-box')\n",
    "            print('开始干活咯(๑>؂<๑）')\n",
    "            for info in all_info:\n",
    "                href = info.find('a')\n",
    "                if href !=None:\n",
    "                    href='https:'+href['href']\n",
    "                    try:\n",
    "                        print('正在爬取%s'%href)\n",
    "                        house_info=get_house_info(href)\n",
    "                        writer.writerow(house_info)\n",
    "                    except:\n",
    "                        print('出错啦，%s进不去啦( •̥́ ˍ •̀ू )'%href)\n",
    "\n",
    "def get_house_info(href):\n",
    "    #得到房屋的信息\n",
    "    time.sleep(1)\n",
    "    headers = {'User-Agent': random.choice(user_agent)}\n",
    "    response = requests.get(url=href, headers=headers)\n",
    "    response=response.content.decode('utf-8', 'ignore')\n",
    "    soup = BeautifulSoup(response, 'lxml')\n",
    "    name = soup.find('h1', class_='Z_name').text\n",
    "    sinfo=soup.find('div', class_='Z_home_b clearfix').find_all('dd')\n",
    "    area=sinfo[0].text\n",
    "    orien=sinfo[1].text\n",
    "    area_type=sinfo[2].text\n",
    "    dinfo=soup.find('ul',class_='Z_home_o').find_all('li')\n",
    "    location=dinfo[0].find('span',class_='va').text\n",
    "    loucen=dinfo[1].find('span',class_='va').text\n",
    "    dianti=dinfo[2].find('span',class_='va').text\n",
    "    niandai=dinfo[3].find('span',class_='va').text\n",
    "    mensuo=dinfo[4].find('span',class_='va').text\n",
    "    lvhua=dinfo[5].find('span',class_='va').text\n",
    "    ['名称','面积','朝向','户型','位置','楼层','是否有电梯','建成时间',' 门锁','绿化']\n",
    "    room_info=[name,area,orien,area_type,location,loucen,dianti,niandai,mensuo,lvhua]\n",
    "    return room_info\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    get_info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 36kr信息抓取与邮件发送"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "项目难度：⭐⭐⭐⭐⭐\n",
    "\n",
    "完成了上面的实践项目1后，你膨胀到不行，觉得自己太厉害了。通过前面的学习，你了解到使用python进行电子邮件的收发，突然有一天你想到，如果我用A账户进行发送，同时用B账户进行接受，在手机上安装一个邮件接受的软件，这样就能完成信息从pc端投送到移动端。\n",
    "\n",
    "在这样的思想上，就可以对动态变化的信息进行监控，一旦信息触发了发送的条件，可以将信息通过邮件投送到手机上，从而让自己最快感知到。\n",
    "\n",
    "具体路径是：\n",
    "\n",
    "python爬虫-->通过邮件A发送-->服务器--->通过邮件B接收\n",
    "\n",
    "因此我们本节的内容就是爬取36kr的信息然后通过邮件发送\n",
    "\n",
    "36kr官网：<https://36kr.com/newsflashes>\n",
    "\n",
    "通过python发送邮件需要获得pop3的授权码\n",
    "\n",
    "具体获取方式可参考：\n",
    "\n",
    "<https://blog.csdn.net/wateryouyo/article/details/51766345>\n",
    "\n",
    "接下来就爬取36Kr的网站\n",
    "\n",
    "通过观察我们发现 消息的标签为\n",
    "\n",
    "```javascript\n",
    "<a class=\"item-title\" rel=\"noopener noreferrer\" target=\"_blank\" href=\"/newsflashes/1218249313424001\" sensors_operation_list=\"page_flow\">中国平安：推动新方正集团聚集医疗健康等核心业务发展</a>\n",
    "```\n",
    "\n",
    "因此我们爬取的代码为\n",
    "\n",
    "需要注意的是，邮箱发送消息用的HTML的模式，而HTML模式下换行符号为 < br>\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-05-23T04:48:35.202200Z",
     "start_time": "2022-05-23T04:48:35.186201Z"
    }
   },
   "outputs": [],
   "source": [
    "def main(): \n",
    "    print('正在爬取数据')\n",
    "    url = 'https://36kr.com/newsflashes'\n",
    "    headers = {'User-Agent': random.choice(user_agent)}\n",
    "    response = requests.get(url, headers=headers)\n",
    "    response=response.content.decode('utf-8', 'ignore')\n",
    "    soup = BeautifulSoup(response, 'lxml')\n",
    "    news = soup.find_all('a', class_='item-title')  \n",
    "    news_list=[]\n",
    "    for i in news:\n",
    "        title=i.get_text()\n",
    "        href='https://36kr.com'+i['href']\n",
    "        news_list.append(title+'<br>'+href)\n",
    "    info='<br></br>'.join(news_list)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "接下来就是QQ配置邮箱的发送信息\n",
    "\n",
    "SMTP授权码获取方式：\n",
    "\n",
    "https://www.jb51.net/article/228888.htm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests\n",
    "import random\n",
    "from bs4 import BeautifulSoup\n",
    "import smtplib  # 发送邮件模块\n",
    "from email.mime.text import MIMEText  # 定义邮件内容\n",
    "from email.header import Header  # 定义邮件标题\n",
    "\n",
    "smtpserver = 'smtp.qq.com'\n",
    "\n",
    "# 发送邮箱用户名密码\n",
    "user = ''\n",
    "password = ''  #这里填授权码\n",
    "\n",
    "\n",
    "# 发送和接收邮箱\n",
    "sender = ''\n",
    "receive = ''\n",
    "\n",
    "user_agent = [\n",
    "    \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50\",\n",
    "    \"Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50\",\n",
    "    \"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0\",\n",
    "    \"Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; InfoPath.3; rv:11.0) like Gecko\",\n",
    "    \"Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\",\n",
    "    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\",\n",
    "    \"Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1\",\n",
    "    \"Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.8.131 Version/11.11\",\n",
    "    \"Opera/9.80 (Windows NT 6.1; U; en) Presto/2.8.131 Version/11.11\",\n",
    "    \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon 2.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; The World)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; 360SE)\",\n",
    "    \"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Avant Browser)\"]\n",
    "\n",
    "def main():\n",
    "    print('正在爬取数据')\n",
    "    url = 'https://36kr.com/newsflashes'\n",
    "    headers = {'User-Agent': random.choice(user_agent)}\n",
    "    response = requests.get(url, headers=headers)\n",
    "    response=response.content.decode('utf-8', 'ignore')\n",
    "    soup = BeautifulSoup(response, 'lxml')\n",
    "    news = soup.find_all('a', class_='item-title')  \n",
    "    news_list=[]\n",
    "    for i in news:\n",
    "        title=i.get_text()\n",
    "        href='https://36kr.com'+i['href']\n",
    "        news_list.append(title+'<br>'+href)\n",
    "    info='<br></br>'.join(news_list)\n",
    "    print('正在发送信息')\n",
    "    send_email(info)\n",
    "\n",
    "def send_email(content):\n",
    "    # 通过QQ邮箱发送\n",
    "    title='36kr快讯'\n",
    "    subject = title\n",
    "    msg = MIMEText(content, 'html', 'utf-8')\n",
    "    msg['Subject'] = Header(subject, 'utf-8')\n",
    "    msg['From'] = sender\n",
    "    msg['To'] = receive\n",
    "    # SSL协议端口号要使用465\n",
    "    smtp = smtplib.SMTP_SSL(smtpserver, 465)  # 这里是服务器端口！\n",
    "    # HELO 向服务器标识用户身份\n",
    "    smtp.helo(smtpserver)\n",
    "    # 服务器返回结果确认\n",
    "    smtp.ehlo(smtpserver)\n",
    "    # 登录邮箱服务器用户名和密码\n",
    "    smtp.login(user, password)\n",
    "    smtp.sendmail(sender, receive, msg.as_string())\n",
    "    smtp.quit()\n",
    "\n",
    "if __name__ == '__main__':\n",
    "    main()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
